diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-18 20:26:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-12 17:10:35 +0100 |
commit | 28fba553066afafefb3862682fecb001681aca62 (patch) | |
tree | b29aa3bc835c33bbf45419b910007e8380801a76 | |
parent | 7caee172049a80e8c048e3d04202d409a06beeca (diff) | |
download | ffmpeg-28fba553066afafefb3862682fecb001681aca62.tar.gz |
opt: check memory allocation
Bug-Id: CID 1257771
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavutil/opt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index d873bd205e..31434638db 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++); |