Summary: | ab - null pointer when parsing incomplete response | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Glenn Nielsen <glenn> |
Component: | Other Modules | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0.46 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | other | ||
Attachments: | ab - patch null pointer when parsing a partial response |
Description
Glenn Nielsen
2003-06-25 15:19:43 UTC
Created attachment 6973 [details]
ab - patch null pointer when parsing a partial response
Fixed in 2.1 and proposed for backport. I've added another sanity check before committing. The piece of code now looks: [...] /* check response code */ part = strstr(c->cbuff, "HTTP"); /* really HTTP/1.x_ */ if (part && strlen(part) > strlen("HTTP/1.x_")) { strncpy(respcode, (part + strlen("HTTP/1.x_")), 3); respcode[3] = '\0'; } else { strcpy(respcode, "500"); } if (respcode[0] != '2') { [...] Thanks for your patch! |