tif_unix.c: do not _tiffMapProc 0 size files

fixes #22
http://bugzilla.maptools.org/show_bug.cgi?id=2249
This commit is contained in:
Thomas Bernard 2020-03-14 00:08:49 +01:00
parent fe10bc1bc3
commit 0c04331f97
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -162,7 +162,7 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
{
uint64 size64 = _tiffSizeProc(fd);
tmsize_t sizem = (tmsize_t)size64;
if ((uint64)sizem==size64) {
if (size64 && (uint64)sizem==size64) {
fd_as_handle_union_t fdh;
fdh.h = fd;
*pbase = (void*)