Module: libav Branch: release/11 Commit: 61335ab33e594d47b84fde7367ee10dc66fc3465
Author: Vittorio Giovara <[email protected]> Committer: Luca Barbato <[email protected]> Date: Thu Dec 18 20:26:57 2014 +0100 opt: check memory allocation CC: [email protected] Bug-Id: CID 1257771 (cherry picked from commit 07a0c0f0005072d115ace61e60f46be68582cc3a) Signed-off-by: Luca Barbato <[email protected]> --- libavutil/opt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/opt.c b/libavutil/opt.c index 28adef6..059c525 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -119,6 +119,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++); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
