diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-18 20:26:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-17 22:46:33 +0100 |
commit | 71bdcd66e15a92933ad6ca9d9ad9951bf46b7bee (patch) | |
tree | 295525ab7b419cc636280fe249d33e128e481606 | |
parent | a86cc0cc1bd2fa6a178a8cb2541283da920c3c3c (diff) | |
download | ffmpeg-71bdcd66e15a92933ad6ca9d9ad9951bf46b7bee.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 4100d028c1..5b88b28384 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -149,6 +149,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++); |