diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/fav.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c index 6e1398a9..a1f2336a 100644 --- a/mbbsd/fav.c +++ b/mbbsd/fav.c @@ -254,7 +254,9 @@ static int get_type_size(int type) } inline static void* fav_malloc(int size){ - void *p = (void *)malloc(size); + void *p; + assert(size>0); + p = (void *)malloc(size); assert(p); memset(p, 0, size); return p; |