From 967acd82b0c7c426c1695e896efbda14ef8f82d5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 7 Oct 2014 11:12:04 +0200 Subject: [PATCH] lib/fetch/http.c: CID 62725 (NULL pointer dereference) --- lib/fetch/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fetch/http.c b/lib/fetch/http.c index 27577878..4be31c46 100644 --- a/lib/fetch/http.c +++ b/lib/fetch/http.c @@ -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;