On Monday 16 June 2025 19:32:40 Lasse Collin wrote:
> 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.

You are right. And fsetpos() implementation has the same issue.


_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to