diff --git a/libtiff/tif_unix.c b/libtiff/tif_unix.c index 874f1feb..bea1ef78 100644 --- a/libtiff/tif_unix.c +++ b/libtiff/tif_unix.c @@ -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*)