diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 00e86bb50b..5b243dcb9d 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -248,7 +248,7 @@ static int decode_main_header(NUTContext *nut) } GET_V(nut->time_base_count, tmp > 0 && tmp < INT_MAX / sizeof(AVRational)); - nut->time_base = av_malloc(nut->time_base_count * sizeof(AVRational)); + nut->time_base = av_malloc_array(nut->time_base_count, sizeof(AVRational)); if (!nut->time_base) return AVERROR(ENOMEM);