Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
* libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesAcTable
Browse files Browse the repository at this point in the history
when read fails.
Patch by Nicolás Peña.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659
  • Loading branch information
erouault committed Jan 12, 2017
1 parent 6c60215 commit 8283e4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2017-01-12 Even Rouault <even.rouault at spatialys.com>

* libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesAcTable
when read fails.
Patch by Nicolás Peña.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659

2017-01-11 Even Rouault <even.rouault at spatialys.com>

* libtiff/tif_luv.c, tif_lzw.c, tif_packbits.c: return 0 in Encode
Expand Down
3 changes: 3 additions & 0 deletions libtiff/tif_ojpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,10 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif)
rb[sizeof(uint32)+5+n]=o[n];
p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
if (p!=q)
{
_TIFFfree(rb);
return(0);
}
sp->actable[m]=rb;
sp->sos_tda[m]=(sp->sos_tda[m]|m);
}
Expand Down

0 comments on commit 8283e4d

Please sign in to comment.