[Gptfdisk-general] [PATCH 3/4] Always use off64_t to avoid overflow issues
Brought to you by:
srs5694
From: Cody P S. <de...@co...> - 2015-06-17 21:37:05
|
--- diskio-unix.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diskio-unix.cc b/diskio-unix.cc index 7be0bbe..71b4387 100644 --- a/diskio-unix.cc +++ b/diskio-unix.cc @@ -272,7 +272,7 @@ int DiskIO::DiskSync(void) { // Note that seeking beyond the end of the file is NOT detected as a failure! int DiskIO::Seek(uint64_t sector) { int retval = 1; - off_t seekTo, sought; + off64_t seekTo, sought; // If disk isn't open, try to open it.... if (!isOpen) { @@ -389,7 +389,7 @@ int DiskIO::Write(void* buffer, int numBytes) { // return correct values for disk image files. uint64_t DiskIO::DiskSize(int *err) { uint64_t sectors = 0; // size in sectors - off_t bytes = 0; // size in bytes + off64_t bytes = 0; // size in bytes struct stat64 st; int platformFound = 0; #ifdef __sun__ -- 2.4.3 |