comparison src/c/fastcgi.c @ 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 c93fbd139732
children
comparison
equal deleted inserted replaced
2105:882556b3029d 2106:18ef1db770f6
331 size_t body_size = 0; 331 size_t body_size = 0;
332 char *body = malloc(0); 332 char *body = malloc(0);
333 size_t path_size = 0; 333 size_t path_size = 0;
334 char *path_buf = malloc(0); 334 char *path_buf = malloc(0);
335 335
336 hs.uppercased = malloc(0); 336 hs.uppercased = malloc(6);
337 hs.uppercased_len = 0; 337 hs.uppercased_len = 0;
338 hs.nvps = malloc(sizeof(nvp)); 338 hs.nvps = malloc(sizeof(nvp));
339 hs.n_nvps = 1; 339 hs.n_nvps = 1;
340 hs.nvps[0].name = malloc(1); 340 hs.nvps[0].name = malloc(1);
341 hs.nvps[0].name_len = 1; 341 hs.nvps[0].name_len = 1;