diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2018-03-26 11:05:31 -0700 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2018-03-29 15:42:13 -0700 |
commit | a15c2a8957b9883cb293fdacaeabd7f2e037a0a5 (patch) | |
tree | 0a133e8bfeb6a4d2f55be12a76a427e01f1cd7c9 /tools/aapt2/LoadedApk.cpp | |
parent | 3730b6bab6db741170471c2bd2755e3b31293a93 (diff) |
Check the size of the strings in the StringPool before flattening.
Test: Tested for normal functionality when string does not exceed
maximum length and tests for detection of string that is too lonhg for
UTF8i
Bug: b/74176037
Change-Id: Ic71d3671a069e7012e8ca107e79e071499eebbf6
Diffstat (limited to 'tools/aapt2/LoadedApk.cpp')
-rw-r--r-- | tools/aapt2/LoadedApk.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/LoadedApk.cpp b/tools/aapt2/LoadedApk.cpp index 4a4260d1d323..1dd46ba813db 100644 --- a/tools/aapt2/LoadedApk.cpp +++ b/tools/aapt2/LoadedApk.cpp @@ -225,7 +225,7 @@ bool LoadedApk::WriteToArchive(IAaptContext* context, ResourceTable* split_table } } else if (format_ == ApkFormat::kProto && path == kProtoResourceTablePath) { pb::ResourceTable pb_table; - SerializeTableToPb(*split_table, &pb_table); + SerializeTableToPb(*split_table, &pb_table, context->GetDiagnostics()); if (!io::CopyProtoToArchive(context, &pb_table, path, |