shithub: sox

Download patch

ref: c20cfab0e5605f6e57df4b14b0d2bd2ae44af195
parent: 542cab5f35508e4bd8dd52db069a562f5f86d33a
author: Rob Sykes <robs@users.sourceforge.net>
date: Thu Dec 6 01:15:09 EST 2012

[3592482] Fix hang with rate effect & signal-length more than 2^31 samples.

--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,12 @@
     independently. (Ulrich Klauer)
   o Fix memory leaks. (Ulrich Klauer)
 
+Other bug fixes:
+
+  o [3592482] Fix hang with rate effect & signal-length more than
+  2^31 samples.  (MrMod).
+
+
 
 sox-14.4.1	20xx-xx-xx
 ----------
--- a/src/rate.c
+++ b/src/rate.c
@@ -482,7 +482,7 @@
   size_t remaining = samples_out - p->samples_out;
   sample_t * buff = calloc(1024, sizeof(*buff));
 
-  if ((int)remaining > 0) {
+  if (samples_out > p->samples_out) {
     while ((size_t)fifo_occupancy(fifo) < remaining) {
       rate_input(p, buff, (size_t) 1024);
       rate_process(p);