shithub: sox

Download patch

ref: fc5263cf0f108d31f5afda9007227c3afa03852b
parent: f0230901289e423cd58430d51b9e60951b3f1417
author: cbagwell <cbagwell>
date: Thu Apr 12 15:52:21 EDT 2001

Correct AU header lengths when comments were less then 4 bytes.

--- a/Changelog
+++ b/Changelog
@@ -42,6 +42,11 @@
   o Ben Last added a new program that uses libst and will merge two
     seperate audio files into a single file with multiple channels.
     Written for sox 12.16 so doesn't work with 12.17.2 yet.
+  o Andreas Menke fixed some problems with the speed effect and
+    how effects were drained.  Also improved the usage of printf()'s
+    to use stderr.
+  o Corrected AU header length value when comments were less than
+    4 bytes.
 
 sox-12.17.1
 -----------
--- a/src/au.c
+++ b/src/au.c
@@ -423,6 +423,9 @@
 		ft->comment = "SOX";
 
 	hdr_size = SUN_HDRSIZE + strlen(ft->comment) + 1; /*+1 = null-term. */
+	if (strlen(ft->comment) < 3)
+	    hdr_size += 3 - strlen(ft->comment);
+
 	st_writedw(ft, hdr_size);
 
 	st_writedw(ft, data_size);