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-04-04 15:54:43 +0000
commit70414f22dcab1d4ce3c2e9d981f3256a9ba62515 (patch)
tree4f16c1c60a077ba21af55e0df26d791143afa9cf /tools/aapt2/cmd/Compile.cpp
parenta926126a8bc89c1a6bd7fa8a76332476eba0d954 (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 (cherry picked from commit a15c2a8957b9883cb293fdacaeabd7f2e037a0a5)
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 101f74eafaf4..2d83a14e541d 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;