diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-04 13:00:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-04 13:00:59 +0200 |
commit | e7389ed5d0bd13daf0af9ca7a4b9bc0d21aad9b1 (patch) | |
tree | 6a574c3b143bdb066d2ac28c318b194171a23239 /libavutil | |
parent | 534b2921028aad12d581c69ae425363ffe52df0d (diff) | |
parent | bcc94328980e6c56546792ab08b0756abdce310b (diff) | |
download | ffmpeg-e7389ed5d0bd13daf0af9ca7a4b9bc0d21aad9b1.tar.gz |
Merge commit 'bcc94328980e6c56546792ab08b0756abdce310b'
* commit 'bcc94328980e6c56546792ab08b0756abdce310b':
opt: check the return values of av_get_token for ENOMEM.
doc: Fix best_nb_channells typo
matroska: pass the lace size to the matroska_parse_rm_audio
Conflicts:
libavformat/matroskadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/opt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index ab73913a39..0e7a3a85bb 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1032,9 +1032,16 @@ static int parse_key_value_pair(void *ctx, const char **buf, char *val; int ret; + if (!key) + return AVERROR(ENOMEM); + if (*key && strspn(*buf, key_val_sep)) { (*buf)++; val = av_get_token(buf, pairs_sep); + if (!val) { + av_freep(&key); + return AVERROR(ENOMEM); + } } else { av_log(ctx, AV_LOG_ERROR, "Missing key or no key/value separator found after key '%s'\n", key); av_free(key); |