Mercurial > libavformat.hg
changeset 3410:18239c59049b libavformat
Check whether the memory allocation for extradata succeeded. Fixes issue 472.
author | takis |
---|---|
date | Sun, 01 Jun 2008 16:25:05 +0000 |
parents | 524179afafe7 |
children | d31673961099 |
files | rmdec.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rmdec.c Sun Jun 01 14:41:53 2008 +0000 +++ b/rmdec.c Sun Jun 01 16:25:05 2008 +0000 @@ -235,6 +235,8 @@ return -1; } st->codec->extradata= av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); + if (!st->codec->extradata) + return AVERROR(ENOMEM); get_buffer(pb, st->codec->extradata, st->codec->extradata_size); // av_log(NULL, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);