From a6cdd9a6989c00e9c2e322607c806188a1a5182a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 7 Oct 2014 11:07:24 +0200 Subject: [PATCH] lib/fetch/common.c: CID 62709 (NULL pointer dereference) --- lib/fetch/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fetch/common.c b/lib/fetch/common.c index c212c5fb..1ea017bd 100644 --- a/lib/fetch/common.c +++ b/lib/fetch/common.c @@ -520,6 +520,8 @@ fetch_read(conn_t *conn, char *buf, size_t len) ssize_t rlen; int r; + if (!buf) + return -1; if (len == 0) return 0;