ext/speex/gstspeexdec.c: Fix bounds checking of mode in Speex header, which may produ...
authorJan Schmidt <thaytan@mad.scientist.com>
Fri, 11 Apr 2008 10:32:20 +0000 (10:32 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Fri, 11 Apr 2008 10:32:20 +0000 (10:32 +0000)
Original commit message from CVS:
* ext/speex/gstspeexdec.c: (speex_dec_chain_parse_header):
Fix bounds checking of mode in Speex header, which may
produce negative numbers in speex < 1.1.12

ChangeLog
ext/speex/gstspeexdec.c

index 1feb940..b418e46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-11  Jan Schmidt  <Jan.Schmidt@sun.com>
+
+       * ext/speex/gstspeexdec.c: (speex_dec_chain_parse_header):
+       Fix bounds checking of mode in Speex header, which may
+       produce negative numbers in speex < 1.1.12
+
 2008-04-09  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/goom/Makefile.am:
index fbd7125..48d1605 100644 (file)
@@ -507,7 +507,7 @@ speex_dec_chain_parse_header (GstSpeexDec * dec, GstBuffer * buf)
   if (!dec->header)
     goto no_header;
 
-  if (dec->header->mode >= SPEEX_NB_MODES)
+  if (dec->header->mode >= SPEEX_NB_MODES || dec->header->mode < 0)
     goto mode_too_old;
 
   dec->mode = (SpeexMode *) speex_mode_list[dec->header->mode];