]> git.sesse.net Git - vlc/commitdiff
DO NOT F***ING REMOVE my asserts()
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 11 Mar 2007 17:13:55 +0000 (17:13 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 11 Mar 2007 17:13:55 +0000 (17:13 +0000)
(unless the assertion is false, which is not the case here)

modules/access_filter/dump.c

index b22c7f433c3eed1549a97b4a6705e04e93420792..38139d0adfa6b13f73c570ec71e8125c0c71f5ba 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <assert.h>
 #include <time.h>
 #include <errno.h>
 
@@ -165,6 +166,7 @@ static void Dump (access_t *access, const uint8_t *buffer, size_t len)
         goto error;
     }
 
+    assert (len > 0);
     if (fwrite (buffer, len, 1, stream) != 1)
     {
         msg_Err (access, "cannot write to file: %s", strerror (errno));