From 201f61906c56caddbeaa1183e61a38de7944ab5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 13 Jan 2009 22:38:16 +0200 Subject: [PATCH] decomp: add assertion against #2409 --- modules/stream_filter/decomp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c index a3395cf80f..141cb4d170 100644 --- a/modules/stream_filter/decomp.c +++ b/modules/stream_filter/decomp.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #ifndef _POSIX_SPAWN # define _POSIX_SPAWN (-1) @@ -182,6 +183,7 @@ static int Read (stream_t *stream, void *buf, unsigned int buflen) length += Read (stream, ((char *)buf) + length, buflen - length); return length; } + assert ((buf != NULL) || (buflen == 0)); length = net_Read (stream, p_sys->read_fd, NULL, buf, buflen, false); if (length < 0) -- 2.39.2