Open
Description
When using ftello()
with a big file (over 2GB), the returned value is invalid (.e.g 0xffffffff88776655
) as if it suffered overflow from a 32-bit limit.
I'd expect such behavior from ftell()
, but since ftello()
return a off_t
type (64 bits) I'd have expected a valid value.
Btw, using stat()
on the same file and getting the size attribute returns the expected file size value.
Example:
FILE *f = fopen("/dev_hdd0/tmp/bigfile.bin", "rb");
fseeko(f, 0, SEEK_END);
off_t TotalSize = ftello(f);
fclose(f);
printf("File size: %016llX", TotalSize);
Metadata
Metadata
Assignees
Labels
No labels