summaryrefslogtreecommitdiff
path: root/tools/aapt2/util/Util.cpp
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-06-02 16:32:37 -0700
committerAdam Lesinski <adamlesinski@google.com>2017-06-06 20:02:38 +0000
commitb9f0548341f98a64a87fa35ef5f58d1daf973ca7 (patch)
treeb18439dee3ec04c180e2934a0d5d6c574ee37be4 /tools/aapt2/util/Util.cpp
parent63c5c9462a0175143791d7a5491a67a1a645cab4 (diff)
AAPT2: Do not interpret %n as a format specifier in string resources
%n is a special value marking a platform independent newline and is not to be considered a format argument. Bug: 37132275 Test: make aapt2_tests Change-Id: I806521e44afe20004344dee9f18ecee6cc7086ea
Diffstat (limited to 'tools/aapt2/util/Util.cpp')
-rw-r--r--tools/aapt2/util/Util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/aapt2/util/Util.cpp b/tools/aapt2/util/Util.cpp
index cf2232254ec4..28e952e25a67 100644
--- a/tools/aapt2/util/Util.cpp
+++ b/tools/aapt2/util/Util.cpp
@@ -203,7 +203,7 @@ bool VerifyJavaStringFormat(const StringPiece& str) {
if (*c == '%' && c + 1 < end) {
c++;
- if (*c == '%') {
+ if (*c == '%' || *c == 'n') {
c++;
continue;
}