summaryrefslogtreecommitdiff
path: root/libavcodec/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/png.c')
-rw-r--r--libavcodec/png.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/png.c b/libavcodec/png.c
index 70a080e29e..65d696476a 100644
--- a/libavcodec/png.c
+++ b/libavcodec/png.c
@@ -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)