ffmpeg | branch: release/2.5 | Vittorio Giovara <vittorio.giov...@gmail.com> | Thu Dec 18 20:26:57 2014 +0100| [28fba553066afafefb3862682fecb001681aca62] | committer: Michael Niedermayer
opt: check memory allocation Bug-Id: CID 1257771 Signed-off-by: Michael Niedermayer <michae...@gmx.at> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28fba553066afafefb3862682fecb001681aca62 --- libavutil/opt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/opt.c b/libavutil/opt.c index d873bd2..3143463 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -143,6 +143,8 @@ static int set_string_binary(void *obj, const AVOption *o, const char *val, uint len /= 2; ptr = bin = av_malloc(len); + if (!ptr) + return AVERROR(ENOMEM); while (*val) { int a = hexchar2int(*val++); int b = hexchar2int(*val++); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog