Rejects bad multistream frame length
authorMark Harris <mark.hsj@gmail.com>
Sun, 13 Oct 2013 05:23:58 +0000 (01:23 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Sun, 13 Oct 2013 05:25:32 +0000 (01:25 -0400)
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
src/opus_decoder.c

index 76f55a8..1f39578 100644 (file)
@@ -716,7 +716,7 @@ int opus_packet_parse_impl(const unsigned char *data, opus_int32 len,
             return OPUS_INVALID_PACKET;
          for (i=0;i<count-1;i++)
             size[i] = size[count-1];
-      } else if(size[count-1] > last_size)
+      } else if (bytes+size[count-1] > last_size)
          return OPUS_INVALID_PACKET;
    } else
    {