diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-09-09 23:15:07 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-09 23:15:08 +0000 |
commit | e7ad74f070559336e9ad67897553e34a9c584242 (patch) | |
tree | 8fb3e335bbeedb3378a6e43c57e3f8f0ce3e2e07 /tools | |
parent | a7cbaeb138b280b51f282a371cd11c65c0d05d1b (diff) | |
parent | 3fb8c9b50ef1873454acf3a4e7fd33ad182c03d7 (diff) | |
download | frameworks_base-e7ad74f070559336e9ad67897553e34a9c584242.zip frameworks_base-e7ad74f070559336e9ad67897553e34a9c584242.tar.gz frameworks_base-e7ad74f070559336e9ad67897553e34a9c584242.tar.bz2 |
Merge "AAPT: Don't crash on illegal symbol name" into lmp-dev
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 b3c364b..8341de6 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) { |