aboutsummaryrefslogtreecommitdiffstats
path: root/libavresample/arm/audio_convert_init.c
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2019-12-06 14:22:14 -0500
committerJames Almer <jamrial@gmail.com>2019-12-16 12:04:45 -0300
commitc07a77247363eb666a49536af505e7317225ee81 (patch)
treecace545e999f0b0ea0afab13db778aad0097bb11 /libavresample/arm/audio_convert_init.c
parented9279afbd3be917b599c8a52ad8414db8b58c0e (diff)
downloadffmpeg-c07a77247363eb666a49536af505e7317225ee81.tar.gz
lavc/cbs_h2645_syntax_template: Fix memleak
payload_count is used to track the number of SEI payloads. It is also used to free the SEIs in cbs_h264_free_sei()/cbs_h265_free_sei(). Currently, payload_count is set after for loop is completed. Hence if there is an error and the function exits, the payload remains zero causing a memleak. This commit keeps track of payload_count inside the for loop to fix the issue. Note that that the contents of current are initialized with av_mallocz() so there is no need to zero initialize payload_count. Found-by: libFuzzer Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavresample/arm/audio_convert_init.c')
0 files changed, 0 insertions, 0 deletions