# HG changeset patch # User takis # Date 1212337505 0 # Node ID 18239c59049bdebf48ff50cc0ba15f0c11f179bd # Parent 524179afafe7189af7bf0fa673382d1c7a197ace Check whether the memory allocation for extradata succeeded. Fixes issue 472. diff -r 524179afafe7 -r 18239c59049b rmdec.c --- 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);