Skip to content
Permalink
Browse files Browse the repository at this point in the history
https://github.com/ImageMagick/ImageMagick/issues/1602
  • Loading branch information
Cristy committed Jun 18, 2019
1 parent 35ccb46 commit fe5f4b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coders/tiff.c
Expand Up @@ -258,6 +258,12 @@ static MagickOffsetType TIFFSeekCustomStream(const MagickOffsetType offset,
}
case SEEK_CUR:
{
if (((offset > 0) && (profile->offset > (SSIZE_MAX-offset))) ||
((offset < 0) && (profile->offset < (-SSIZE_MAX-offset))))
{
errno=EOVERFLOW;
return(-1);
}
if ((profile->offset+offset) < 0)
return(-1);
profile->offset+=offset;
Expand Down

0 comments on commit fe5f4b8

Please sign in to comment.