From 2a82908062b9396f8fcf9c020b14a55adc17c583 Mon Sep 17 00:00:00 2001
From: Mark Harris <mark.hsj@gmail.com>
Date: Sun, 13 Oct 2013 01:23:58 -0400
Subject: [PATCH] Rejects bad multistream frame length

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
---
 src/opus_decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index 76f55a808..1f3957893 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -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
    {
-- 
GitLab