Commit 486f0b0c authored by Justin Ruggles's avatar Justin Ruggles

png: use av_mallocz_array() for the zlib zalloc function

Fixes valgrind uninitialized memory errors when decoding png.

CC:libav-stable@libav.org
parent e984f478
......@@ -47,9 +47,7 @@ const uint8_t ff_png_pass_mask[NB_PASSES] = {
void *ff_png_zalloc(void *opaque, unsigned int items, unsigned int size)
{
if(items >= UINT_MAX / size)
return NULL;
return av_malloc(items * size);
return av_mallocz_array(items, size);
}
void ff_png_zfree(void *opaque, void *ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment