mirror of https://github.com/xiph/flac
Work around i386 ASAN fseek bug
For some reason, i386 ASAN's fseek does not have large file support, and off_t is actually a 32-bit int
This commit is contained in:
parent
e50c876a1c
commit
ce91056644
|
@ -2892,6 +2892,13 @@ FLAC__bool fskip_ahead(FILE *f, FLAC__uint64 offset)
|
|||
static uint8_t dump[8192];
|
||||
struct flac_stat_s stb;
|
||||
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
#ifdef __i386__
|
||||
/* Work around i386 ASAN bug */
|
||||
if(offset > (FLAC__uint64)(INT32_MAX)) return false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(flac_fstat(fileno(f), &stb) == 0 && (stb.st_mode & S_IFMT) == S_IFREG)
|
||||
{
|
||||
if(fseeko(f, offset, SEEK_CUR) == 0)
|
||||
|
|
Loading…
Reference in New Issue