On 8/29/20, Andreas Rheinhardt <[email protected]> wrote: > TrueMotion 2.0 uses Huffmann trees. To parse them, the decoder allocates > arrays for the codes, their lengths and their value; afterwards a VLC > table is initialized using these values. If everything up to this point > succeeds, a new buffer of the same size as the already allocated arrays > for the values is allocated and upon success the values are copied into > the new array; all the old arrays are then freed. Yet if allocating the > new array fails, the old arrays get freed, but the VLC table doesn't. > > This leak is fixed by not allocating a new array at all; instead the old > array is simply reused, ensuring that nothing can fail after the > creation of the VLC table. > > Signed-off-by: Andreas Rheinhardt <[email protected]> > --- > libavcodec/truemotion2.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) >
probably ok _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
