Fix a segfault that would occur in decompress-only mode if -alloc was specified without -tile.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1156 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -567,7 +567,7 @@ void dodecomptest(char *filename)
|
||||
_throwunix("allocating JPEG size array");
|
||||
memset(jpegsize, 0, sizeof(unsigned long)*ntilesw*ntilesh);
|
||||
|
||||
if((flags&TJFLAG_NOREALLOC)!=0)
|
||||
if((flags&TJFLAG_NOREALLOC)!=0 || !dotile)
|
||||
for(i=0; i<ntilesw*ntilesh; i++)
|
||||
{
|
||||
if((jpegbuf[i]=(unsigned char *)malloc(tjBufSize(tilew, tileh,
|
||||
|
||||
Reference in New Issue
Block a user