uhttpd: fix off-by-one in last commit
This commit is contained in:
parent
008fbe53e3
commit
7740fd6665
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ static struct http_response * uh_cgi_header_parse(char *buf, int len, int *off)
|
||||||
if( ((bufptr = strfind(buf, len, "\r\n\r\n", 4)) != NULL) ||
|
if( ((bufptr = strfind(buf, len, "\r\n\r\n", 4)) != NULL) ||
|
||||||
((bufptr = strfind(buf, len, "\n\n", 2)) != NULL)
|
((bufptr = strfind(buf, len, "\n\n", 2)) != NULL)
|
||||||
) {
|
) {
|
||||||
*off = (int)(bufptr - buf) + ((bufptr[1] == '\r') ? 4 : 2);
|
*off = (int)(bufptr - buf) + ((bufptr[0] == '\r') ? 4 : 2);
|
||||||
|
|
||||||
memset(&res, 0, sizeof(res));
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue