[clam-devel] Two issues found by Valgrind

Daniel Glöckner daniel-gl at gmx.net
Sun Jul 20 14:54:57 PDT 2014


Hi David,

On Sun, Jul 20, 2014 at 11:39:03PM +0200, David García Garzón wrote:
> Thanks a lot for the patch. Your account at the bug tracker should be
> working, as i received a notification that you created it. It would be
> nice if you file both bugs so that we can do the tracking.

well, I didn't have the chance to pick a password, so I can't log in.

> I will get some spare time this week to reproduce them and apply the patch.
> 
> Please, it would be useful to us if you provide with the report a
> network file or a code snippet that exposes the leak.

I just loaded an mp3 into chordata.

It should be obvious that there is something wrong in those lines.

_spectrum has 2*mFrameSize elements but when i is 1, we store
the imaginary part in spectrum[mFrameSize*2-1+1].

In changeChordIfSegmentTooSmall onsets.size() is not the number of
the last segment. It is the number of the last segment plus one.
So if segment == onset.size()-1, we access onsets[onset.size()] a
few lines later.

  Daniel



More information about the clam-devel mailing list