summaryrefslogtreecommitdiff
path: root/tools/aapt2/cmd/Compile.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2018-03-26 11:05:31 -0700
committerRyan Mitchell <rtmitchell@google.com>2018-03-29 15:42:13 -0700
commita15c2a8957b9883cb293fdacaeabd7f2e037a0a5 (patch)
tree0a133e8bfeb6a4d2f55be12a76a427e01f1cd7c9 /tools/aapt2/cmd/Compile.cpp
parent3730b6bab6db741170471c2bd2755e3b31293a93 (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/cmd/Compile.cpp')
-rw-r--r--tools/aapt2/cmd/Compile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 06e84ef9c525..52b35045fd74 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -258,7 +258,7 @@ static bool CompileTable(IAaptContext* context, const CompileOptions& options,
ContainerWriter container_writer(&copying_adaptor, 1u);
pb::ResourceTable pb_table;
- SerializeTableToPb(table, &pb_table);
+ SerializeTableToPb(table, &pb_table, context->GetDiagnostics());
if (!container_writer.AddResTableEntry(pb_table)) {
context->GetDiagnostics()->Error(DiagMessage(output_path) << "failed to write");
return false;