* Fix a crash when scanning images without read access. (SF bug #3395670)

This commit is contained in:
Justin Maggard
2011-08-22 18:24:19 +00:00
parent 546175743a
commit 1fc5f599f1
3 changed files with 18 additions and 15 deletions

View File

@ -482,7 +482,7 @@ image_new_from_jpeg(const char * path, int is_file, const char * buf, int size,
if(cinfo.output_components == 3)
{
ofs = 0;
if((ptr = (unsigned char *)malloc(w * 3 * cinfo.rec_outbuf_height + 8)) == NULL)
if((ptr = (unsigned char *)malloc(w * 3 * cinfo.rec_outbuf_height + 16)) == NULL)
{
DPRINTF(E_WARN, L_METADATA, "malloc failed\n");
image_free(vimage);