summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 2b9ced728..6d1b86a42 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -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) {