[flac-dev] free() invalid pointer

lvqcl lvqcl.mail at gmail.com
Thu Nov 13 08:45:41 PST 2014


Martijn van Beurden <mvanb1 at gmail.com> писал(а) в своём письме Thu, 13 Nov 2014 17:47:53 +0300:

> Apparently the new presets are triggering an invalid free in
> some code. I was running the test suite on ARM, and it gets
> stuck with small blocksizes.
>
>> Testing blocksize variations...
>> noise8m32 (--channels=1 --bps=8 -8 -p -e -l 0 --lax
>> --blocksize=16 ): encode...decode...compare...OK
>> noise8m32 (--channels=1 --bps=8 -8 -p -e -l 1 --lax
>> --blocksize=16 ): encode...*** Error in
>> `/home/pi/bin/flac/src/flac/.libs/lt-flac': free(): invalid
>> pointer: 0x018a41d0 ***

FLAC__window_partial_tukey():

	Np = (FLAC__int32)(p / 2.0f * N) - 1;

and Np can be equal to -1. So later in the code

	for (; n < (end_n-Np); n++)
		window[n] = 1.0f;

libFLAC writes outside of window[] memory.


More information about the flac-dev mailing list