aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vima.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-01 17:13:32 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-03 16:12:52 +0100
commitefc323062c20aaead8fb5805b7f69b4f071cb319 (patch)
treecc84ce399a22cae3b16a891de854dcef839222db /libavcodec/vima.c
parentcf8925a0965a75f22cddb1cc42e11871ccf84c15 (diff)
downloadffmpeg-efc323062c20aaead8fb5805b7f69b4f071cb319.tar.gz
fftools/ffmpeg_filter: Avoid DynBuf API to improve error checks
choose_pix_fmts() used the dynamic buffer API to write strings; as is common among uses of this API, only opening the dynamic buffer was checked, but not the end result, leading to crashes in case of allocation failure. Furthermore, some static strings were duplicated; the allocations performed here were not properly checked: Allocation failure would be treated as "could not determine pixel format". The first issue is fixed by switching to the AVBPrint API which allows to easily perform checks at the end. Furthermore, the internal buffer avoids almost all allocations in case the AVBPrint is used. The AVBPrint also allows to solve the second issue in an elegant way, because it allows to return the static strings directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vima.c')
0 files changed, 0 insertions, 0 deletions