# HG changeset patch # User michaelni # Date 1039005745 0 # Node ID 2ac4caad5ca6c65231df019a02f2251960b1718e # Parent b3ae2aba4b241bc0867f62404f03cbf0b377e2f0 print a warning if something allocates 0 bytes diff -r b3ae2aba4b24 -r 2ac4caad5ca6 utils.c --- a/utils.c Wed Dec 04 12:36:18 2002 +0000 +++ b/utils.c Wed Dec 04 12:42:25 2002 +0000 @@ -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;