[FFmpeg-cvslog] vorbisdec: Error on bark_map_size equal to 0.
Michael Niedermayer
git at videolan.org
Sun Mar 3 12:11:01 CET 2013
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 11 00:54:12 2013 +0100| [494ddd377ada76ed555f7a3f49391455daa099c9] | committer: Reinhard Tartler
vorbisdec: Error on bark_map_size equal to 0.
The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.
CVE-2013-0894
CC: libav-stable at libav.org
Reported-by: Dale Curtis <dalecurtis at chromium.org>
Found-by: inferno at chromium.org
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 11dcecfcca0eca1a571792c4fa3c21fb2cfddddc)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=494ddd377ada76ed555f7a3f49391455daa099c9
---
libavcodec/vorbisdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 4b87ef9..cfa89be 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -597,6 +597,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
return AVERROR_INVALIDDATA;
}
floor_setup->data.t0.bark_map_size = get_bits(gb, 16);
+ if (floor_setup->data.t0.bark_map_size == 0) {
+ av_log(vc->avccontext, AV_LOG_ERROR,
+ "Floor 0 bark map size is 0.\n");
+ return AVERROR_INVALIDDATA;
+ }
floor_setup->data.t0.amplitude_bits = get_bits(gb, 6);
/* zero would result in a div by zero later *
* 2^0 - 1 == 0 */
More information about the ffmpeg-cvslog
mailing list