shithub: opus-tools

Download patch

ref: ef08771c2857f91d5d573a600f7411c375381cdf
parent: de48094873f8f4e77155d0651ed97ebbbf96f047
author: Gregory Maxwell <greg@xiph.org>
date: Thu May 24 12:42:36 EDT 2012

Also reject v1 headers which are too long.

--- a/src/opus_header.c
+++ b/src/opus_header.c
@@ -171,7 +171,9 @@
       h->stream_map[0]=0;
       h->stream_map[1]=1;
    }
-   if (h->version==0 && p.pos != len)
+   /*For version 0/1 we know there won't be any more data
+     so reject any that have data past the end.*/
+   if ((h->version==0 || h->version==1) && p.pos != len)
       return 0;
    return 1;
 }