Add warning or workaround for libjpeg-turbo

This commit is contained in:
Christophe Grenier 2011-04-03 18:13:37 +02:00
parent 785602ec29
commit 5b6c527665
2 changed files with 4 additions and 2 deletions

View file

@ -928,8 +928,9 @@ static void jpg_check_picture(file_recovery_t *file_recovery)
}
else
{
jpeg_session.frame = (unsigned char *)MALLOC(jpeg_session.output_height * jpeg_session.row_stride);
memset(jpeg_session.frame, 0x80, jpeg_session.row_stride * jpeg_session.cinfo.output_height);
/* FIXME out of bound read access in libjpeg-turbo */
jpeg_session.frame = (unsigned char *)MALLOC((jpeg_session.output_height+1) * jpeg_session.row_stride);
memset(jpeg_session.frame, 0x80, (jpeg_session.cinfo.output_height+1) * jpeg_session.row_stride);
}
while (jpeg_session.cinfo.output_scanline < jpeg_session.cinfo.output_height)
{

View file

@ -2,6 +2,7 @@
File: suspend.c
A suspending/resuming memory manager for libjpeg
NOT COMPATIBLE WITH libjpeg-turbo
Copyright (C) 2009 Christophe GRENIER <grenier@cgsecurity.org>
Copyright (C) 2008 Michael Cohen <scudette@users.sourceforge.net>, part of pyflag