changeset 2106:18ef1db770f6

Fix a potential memory bug in fastcgi.c
author Adam Chlipala <adam@chlipala.net>
date Thu, 22 Jan 2015 09:55:05 -0500
parents 882556b3029d
children 6700f3700328
files src/c/fastcgi.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/fastcgi.c	Thu Jan 22 09:46:20 2015 -0500
+++ b/src/c/fastcgi.c	Thu Jan 22 09:55:05 2015 -0500
@@ -333,7 +333,7 @@
   size_t path_size = 0;
   char *path_buf = malloc(0);
 
-  hs.uppercased = malloc(0);
+  hs.uppercased = malloc(6);
   hs.uppercased_len = 0;
   hs.nvps = malloc(sizeof(nvp));
   hs.n_nvps = 1;