Commit 723b6baa authored by Rostislav Pehlivanov's avatar Rostislav Pehlivanov

pngdec: check for bprint finalization sucess on icc data parsing

It can fail in case of OOM.
Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
parent 3228ac73
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment