Ticket #471 (reopened Bug report)
PATCH: libhttpd crash on invalid HTTP headers
| Reported by: | anonymous | Owned by: | wichert |
|---|---|---|---|
| Priority: | high | Milestone: | Gateway 1.1.5 |
| Component: | Gateway | Version: | |
| Keywords: | Cc: |
Description
In libhttpd/api.c, line 532 you write:
cp = index(buf,':') + 2; if(cp) {
This is a really nasty bug: if index() returns NULL, cp becomes 2 and if(cp) only fails if index returns -2. This will never happen. Therefore you should write something like this:
cp = index(buf,':'); if(cp) {
cp += 2;
Greetings, CK
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

