#11620: av_malloc_array(): nmemb and size arguments transposed
-----------------------------------+--------------------------------------
Reporter: francoisk | Type: defect
Status: new | Priority: normal
Component: avutil | Version: git-master
Keywords: memory | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-----------------------------------+--------------------------------------
At line 356 of `libavutil/frame.c` is the following call to
`av_malloc_array`:
{{{
dst->extended_data = av_malloc_array(sizeof(*dst->extended_data), ch);
}}}
Looks like the arguments are the wrong way around. First is `nmemb` and
second is the size of each member:
{{{
av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
}}}
This was flagged by gcc's `-Wcalloc-transposed-args`.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11620>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".