shithub: sox

Download patch

ref: e300f6a831d519fbf6af71221933359f5fac6feb
parent: ed128fe73e954580a50753558b0836c8a6668725
author: cbagwell <cbagwell>
date: Tue Feb 15 22:50:15 EST 2011

Do not treat zero length chunks as fatal errors.  Continue to
next chunk.

--- a/src/wav.c
+++ b/src/wav.c
@@ -393,7 +393,7 @@
             break; /* Found the given chunk */
 
         /* skip to next chunk */
-        if (*len == 0 || lsx_seeki(ft, (off_t)(*len), SEEK_CUR) != SOX_SUCCESS)
+        if (*len > 0 && lsx_seeki(ft, (off_t)(*len), SEEK_CUR) != SOX_SUCCESS)
         {
             lsx_fail_errno(ft,SOX_EHDR,
                           "WAV chunk appears to have invalid size %d.", *len);