mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +03:00
[project @ 2005-07-16 16:23:08 by adrianl]
Bounds checking in Content-Length handling svn path=/import/netsurf/; revision=1799
This commit is contained in:
parent
23465f5705
commit
dbcfa470c4
@ -741,7 +741,7 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb,
|
||||
/* extract Content-Length header */
|
||||
for (i = 15; i < (int)size && (data[i] == ' ' || data[i] == '\t'); i++)
|
||||
/* */;
|
||||
if ('0' <= data[i] && data[i] <= '9')
|
||||
if (i < (int)size && '0' <= data[i] && data[i] <= '9')
|
||||
f->content_length = atol(data + i);
|
||||
#ifdef WITH_AUTH
|
||||
} else if (16 < size && strncasecmp(data, "WWW-Authenticate", 16) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user