]> granicus.if.org Git - apache/commitdiff
Fixed the new send_all_header_fields() function to properly
authorBrian Pane <brianp@apache.org>
Mon, 7 Oct 2002 15:30:43 +0000 (15:30 +0000)
committerBrian Pane <brianp@apache.org>
Mon, 7 Oct 2002 15:30:43 +0000 (15:30 +0000)
compute the size of the iovec array.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97135 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index b4efb09bb919b9465a3c44eb10848cf72f59a38e..6730df6dcfc66eafa650e1536a015ca9a8e4fd24 100644 (file)
@@ -1168,7 +1168,8 @@ static apr_status_t send_all_header_fields(header_struct *h,
     }
     t_elt = (const apr_table_entry_t *)(elts->elts);
     t_end = t_elt + elts->nelts;
-    vec = (struct iovec *)apr_palloc(h->pool, 4 * elts->nelts);
+    vec = (struct iovec *)apr_palloc(h->pool, 4 * elts->nelts *
+                                     sizeof(struct iovec));
     vec_next = vec;
 
     /* For each field, generate