shithub: opus-tools

Download patch

ref: 3a6d00e7afab930ec6cdd935234537850578668f
parent: ee4b1430bf5e3de19303b4f4d9047d78ac5bb280
author: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
date: Tue Aug 2 08:03:13 EDT 2011

Rejecting headers with junk at the end

--- a/src/opus_header.c
+++ b/src/opus_header.c
@@ -114,6 +114,8 @@
    if (!read_uint16(&p, &shortval))
       return 0;
    h->pregap = shortval;
+   if (h->version==0 && p.pos != len)
+      return 0;
    return 1;
 }