[FFmpeg-cvslog] pngdec: check for bprint finalization sucess on icc data parsing
Rostislav Pehlivanov
git at videolan.org
Thu Nov 9 04:36:07 EET 2017
ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Thu Nov 9 02:34:54 2017 +0000| [723b6baaf8db43d0872bad504c4f4c780b53516b] | committer: Rostislav Pehlivanov
pngdec: check for bprint finalization sucess on icc data parsing
It can fail in case of OOM.
Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=723b6baaf8db43d0872bad504c4f4c780b53516b
---
libavcodec/pngdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 0d6612ccca..5a3d288374 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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) {
More information about the ffmpeg-cvslog
mailing list