mirror of https://git.ffmpeg.org/ffmpeg.git
pngdec: check for bprint finalization sucess on icc data parsing
It can fail in case of OOM. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
3228ac730c
commit
723b6baaf8
|
@ -862,6 +862,8 @@ static int decode_iccp_chunk(PNGDecContext *s, int length, AVFrame *f)
|
|||
return ret;
|
||||
|
||||
av_bprint_finalize(&bp, (char **)&data);
|
||||
if (!data)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
sd = av_frame_new_side_data(f, AV_FRAME_DATA_ICC_PROFILE, bp.len);
|
||||
if (!sd) {
|
||||
|
|
Loading…
Reference in New Issue