diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 21:37:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 21:37:48 +0100 |
commit | b20e79dbe99806d60ae856da830b9d866ffabcc6 (patch) | |
tree | 97aae10e68492647ac59dc2ba9c7e9c4c864e1cc /libavutil | |
parent | dede2f7fc4441606fd07035e7c3e62421ec756b0 (diff) | |
parent | 07a0c0f0005072d115ace61e60f46be68582cc3a (diff) | |
download | ffmpeg-b20e79dbe99806d60ae856da830b9d866ffabcc6.tar.gz |
Merge commit '07a0c0f0005072d115ace61e60f46be68582cc3a'
* commit '07a0c0f0005072d115ace61e60f46be68582cc3a':
opt: check memory allocation
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-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 92d1e39d95..c68dacc0c6 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++); |