git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b4bd31
)
DO NOT F***ING REMOVE my asserts()
author
Rémi Denis-Courmont
<rem@videolan.org>
Sun, 11 Mar 2007 17:13:55 +0000
(17:13 +0000)
committer
Ré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
patch
|
blob
|
history
diff --git
a/modules/access_filter/dump.c
b/modules/access_filter/dump.c
index
b22c7f4
..
38139d0
100644
(file)
--- a/
modules/access_filter/dump.c
+++ b/
modules/access_filter/dump.c
@@
-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));