On 2025-06-15 Pali Rohár wrote: > +/* Define 64-bit _lseeki64() function via 32-bit _lseek() function */ > +__int64 __cdecl _lseeki64(int fd, __int64 offset, int whence) > +{ > + if (offset > LONG_MAX) > + { > + errno = EOVERFLOW; > + return -1; > + }
The offset can make sense when whence != SEEK_SET, so the above should also check for offset < LONG_MIN. -- Lasse Collin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public