aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-12-04 12:42:25 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-12-04 12:42:25 +0000
commit5b20b7328a6b0d0286b6d0f1975fbd417ae010eb (patch)
tree4e52203505263d8fc30fc95e613abdfd17580e47
parentb92be2af42e0c21526cf39df5da8af8a9dac3493 (diff)
downloadffmpeg-5b20b7328a6b0d0286b6d0f1975fbd417ae010eb.tar.gz
print a warning if something allocates 0 bytes
Originally committed as revision 1307 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index d46c51d9cc..bc7da83efe 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -23,6 +23,9 @@
void *av_mallocz(unsigned int size)
{
void *ptr;
+
+ if(size == 0) fprintf(stderr, "Warning, allocating 0 bytes\n");
+
ptr = av_malloc(size);
if (!ptr)
return NULL;