diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-09-10 00:51:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-10 00:51:15 +0000 |
commit | 017d1bdca7d41ceb1351fc73e50f543fb45618a2 (patch) | |
tree | 166c222617efd162ccf2f968c261f4f15abed19d /tools | |
parent | 8c2b2085c9f8735b65a22637600ff23d181c7faf (diff) | |
parent | 99d0ad0dff156d3d752fa2c842c31da084b78777 (diff) | |
download | frameworks_base-017d1bdca7d41ceb1351fc73e50f543fb45618a2.zip frameworks_base-017d1bdca7d41ceb1351fc73e50f543fb45618a2.tar.gz frameworks_base-017d1bdca7d41ceb1351fc73e50f543fb45618a2.tar.bz2 |
am 716c7279: am 799dc748: Merge "AAPT: Don\'t crash on illegal symbol name" into lmp-dev
* commit '716c7279854318eeabad39b7bb187aa69ad41c97':
AAPT: Don't crash on illegal symbol name
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index a88d8fa..dccc363 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -2574,8 +2574,12 @@ status_t ResourceTable::addSymbols(const sp<AaptSymbols>& outSymbols) { continue; } const size_t N = t->getOrderedConfigs().size(); - sp<AaptSymbols> typeSymbols; - typeSymbols = outSymbols->addNestedSymbol(String8(t->getName()), t->getPos()); + sp<AaptSymbols> typeSymbols = + outSymbols->addNestedSymbol(String8(t->getName()), t->getPos()); + if (typeSymbols == NULL) { + return UNKNOWN_ERROR; + } + for (size_t ci=0; ci<N; ci++) { sp<ConfigList> c = t->getOrderedConfigs().itemAt(ci); if (c == NULL) { |