From: SourceForge.net <no...@so...> - 2009-12-24 04:05:44
|
Bugs item #2859842, was opened at 2009-09-16 02:05 Message generated for change (Settings changed) made by idigdoug You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=2859842&group_id=10706 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Ulrich Klauer (uklauer) Assigned to: Nobody/Anonymous (nobody) Summary: stats effect crashes with memory corruption Initial Comment: The stats effect, as in sox somefile.wav -n stats e.g., tends to cause segmentation faults or glibc warnings and often simply hangs. This is apparently due to line 72 in stats.c: memcpy(obuf, ibuf, len * sizeof(*olen)); As *olen is a size_t, it is 8 bytes long on my 64-bit system, while the size of one sample is only 4 bytes (32 bits). This leads to memcpy copying twice as much as was intended. Perhaps what was meant was sizeof(*obuf)? Anyway, I attach a patch that changes it to sizeof(sox_sample_t). With this change, the stats effect works fine for me. ---------------------------------------------------------------------- Comment By: robs (robs) Date: 2009-09-16 03:41 Message: Thanks! Fix now in CVS. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110706&aid=2859842&group_id=10706 |