diff options
author | Abhinav Aggarwal <aabhinav@google.com> | 2020-06-02 13:47:35 +0100 |
---|---|---|
committer | Abhinav Aggarwal <aabhinav@google.com> | 2020-06-18 12:32:28 +0000 |
commit | 0c36a942c9c4e2423a129c85f3c2016fe57fec05 (patch) | |
tree | 05002a82b396deb46792ae66437ee8e978aef676 /libs/androidfw/BackupHelpers.cpp | |
parent | 8f278fb31e80586a95e459cbd6dc64834427ea64 (diff) |
Enable >= 2GiB file size support in backupToTar for 32 bit targets.
backupToTar function used in fullbackup currently uses off_t to
represent file sizes which overflows for files having size >= 2 GiB
on 32 bit target architectures.
This CL replaces off_t with off64_t to overcome this limitation.
Fixes: 157633626
Test: atest libandroidfw_tests
Test: Locally running a backup with a test app having a file of size
2GiB and verifying the size variable in backupToTar doesn't overflow
on a 32 bit target.
Change-Id: I404cced810f331ecb9327495ce1f092f1fa2d378
Diffstat (limited to 'libs/androidfw/BackupHelpers.cpp')
-rw-r--r-- | libs/androidfw/BackupHelpers.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/BackupHelpers.cpp b/libs/androidfw/BackupHelpers.cpp index 8bfe2b6a259a..e80e9486c8b2 100644 --- a/libs/androidfw/BackupHelpers.cpp +++ b/libs/androidfw/BackupHelpers.cpp @@ -479,7 +479,7 @@ void send_tarfile_chunk(BackupDataWriter* writer, const char* buffer, size_t siz } int write_tarfile(const String8& packageName, const String8& domain, - const String8& rootpath, const String8& filepath, off_t* outSize, + const String8& rootpath, const String8& filepath, off64_t* outSize, BackupDataWriter* writer) { // In the output stream everything is stored relative to the root |