]> git.sesse.net Git - vlc/commitdiff
decomp: add assertion against #2409
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 13 Jan 2009 20:38:16 +0000 (22:38 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 13 Jan 2009 20:59:01 +0000 (22:59 +0200)
modules/stream_filter/decomp.c

index a3395cf80f02fa6726fe472f06cb6b625111f277..141cb4d1700761373c5fd8463655849c466e082c 100644 (file)
@@ -26,6 +26,7 @@
 #include <vlc_plugin.h>
 #include <vlc_stream.h>
 #include <vlc_network.h>
+#include <assert.h>
 #include <unistd.h>
 #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)