shithub: sox

Download patch

ref: e81229cddb9147b812f1f9e939f7cda25d950546
parent: 9b27bc7f098efe4eb4a18a3033caceec723b4604
author: Mans Rullgard <mans@mansr.com>
date: Thu Jun 1 14:13:23 EDT 2017

aiff: fix handling of unknown odd-sized chunks [bug #286]

Odd-sized chunks have a padding byte that needs to be skipped.

--- a/src/aiff.c
+++ b/src/aiff.c
@@ -314,6 +314,8 @@
       lsx_readdw(ft, &chunksize);
       if (lsx_eof(ft))
         break;
+      /* account for padding after odd-sized chunks */
+      chunksize += chunksize & 1;
       /* Skip the chunk using lsx_readb() so we may read
          from a pipe */
       while (chunksize-- > 0) {