From: RĂ©mi Denis-Courmont Date: Tue, 13 Jan 2009 20:38:16 +0000 (+0200) Subject: decomp: add assertion against #2409 X-Git-Tag: 1.0.0-pre1~1355 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=201f61906c56caddbeaa1183e61a38de7944ab5a;p=vlc decomp: add assertion against #2409 --- 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)