mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-13 21:26:33 +02:00
vorbisdec: Return AVERROR(ENOMEM) on malloc() failure.
This is especially important because classifs can be very large. Originally committed as revision 24676 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
366d919016
commit
55aa55f2e1
@ -667,6 +667,8 @@ static int vorbis_parse_setup_hdr_residues(vorbis_context *vc)
|
|||||||
res_setup->classifs = av_malloc(res_setup->ptns_to_read *
|
res_setup->classifs = av_malloc(res_setup->ptns_to_read *
|
||||||
vc->audio_channels *
|
vc->audio_channels *
|
||||||
sizeof(*res_setup->classifs));
|
sizeof(*res_setup->classifs));
|
||||||
|
if (!res_setup->classifs)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
AV_DEBUG(" begin %d end %d part.size %d classif.s %d classbook %d \n", res_setup->begin, res_setup->end, res_setup->partition_size,
|
AV_DEBUG(" begin %d end %d part.size %d classif.s %d classbook %d \n", res_setup->begin, res_setup->end, res_setup->partition_size,
|
||||||
res_setup->classifications, res_setup->classbook);
|
res_setup->classifications, res_setup->classbook);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user