shithub: sox

Download patch

ref: 5c849034f9a6b1711d464892151acdd4f1b0ba32
parent: 6e2b4fea1e5d6a18a15f8185d14cb615e173ab23
author: robs <robs>
date: Wed Sep 16 06:38:43 EDT 2009

Fix [2859842] stats effect crashes on 64-bit arch.

--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@
 Effects:
 
   o Fix [2254919] silence doesn't trim digital silence correctly.  (robs)
+  o Fix [2859842] stats effect crashes on 64-bit arch.  (Ulrich Klauer)
 
 Other new features:
 
--- a/src/stats.c
+++ b/src/stats.c
@@ -69,7 +69,7 @@
 {
   priv_t * p = (priv_t *)effp->priv;
   size_t len = *ilen = *olen = min(*ilen, *olen);
-  memcpy(obuf, ibuf, len * sizeof(*olen));
+  memcpy(obuf, ibuf, len * sizeof(*obuf));
 
   for (; len--; ++ibuf, ++p->num_samples) {
     double d = SOX_SAMPLE_TO_FLOAT_64BIT(*ibuf,);