This is what I see in md5.c, line 266:
memset(ctx, 0, sizeof(ctx))
Looks like an error to me, should be memset(ctx, 0, sizeof(*ctx))
I shouldn't have hurried to post this issue. There are more:
metadata_iterator.c around line 1213: function returns without freeing node, so node leaks
metadata_iterator.c around line 1415: function returns without closing a file f
The main issue reported is actually fixed in the 1.3.0. The memset() was incorrect and in the wrong place in 1.2.1 causing the structure not to be completely reset and causing a memory leak.
But there is still an issue with this then according to
since the compiler might delete the memset at the end of an function, so the structure is never cleared at all.
The compiler could only optimize out the memset if the MD5Context was local. Since the MD5Context is actually a function parameter, the calling function can rightly expect that FLAC_MD5Final does indeed clear it.
However, I have added a test to the test suite to validate that FLAC__MD5Final does indeed clear the MD5Context.
Author: Erik de Castro Lopo <email@example.com>
Date: Sat Mar 15 18:25:22 2014 +1100
Add a test to validate that FLAC__MD5Final clears the MD5Context.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.