[vlc-devel] commit: decomp: add assertion against #2409 ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jan 13 21:59:10 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Jan 13 22:38:16 2009 +0200| [201f61906c56caddbeaa1183e61a38de7944ab5a] | committer: Rémi Denis-Courmont 

decomp: add assertion against #2409

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=201f61906c56caddbeaa1183e61a38de7944ab5a
---

 modules/stream_filter/decomp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index a3395cf..141cb4d 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -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)




More information about the vlc-devel mailing list