lib/fetch/http.c: CID 62725 (NULL pointer dereference)

This commit is contained in:
Juan RP 2014-10-07 11:12:04 +02:00
parent a6cdd9a698
commit 967acd82b0

View File

@ -284,6 +284,8 @@ http_readfn(void *v, void *buf, size_t len)
if (!io->buf || io->bufpos == io->buflen)
if (http_fillbuf(io, len) < 1)
break;
if (!io->buf)
return -1;
l = io->buflen - io->bufpos;
if (len < l)
l = len;