diff options
| author | 2014-05-19 15:01:43 -0700 | |
|---|---|---|
| committer | 2014-05-19 15:01:43 -0700 | |
| commit | 25e9d55e964c180ec6e57ba1d977d6c2e1115f5a (patch) | |
| tree | bc25629c89459c5b2775f723174a9c5da69a0eb2 /tools/aapt/Command.cpp | |
| parent | 605a07be7bdda0fd0f8aa4ff18e1769e298663e0 (diff) | |
Don't dump data from a bad ResTable
AAPT dumps data from a bad ResTable, which
causes crashes. Prevent this by checking if
there were errors when creating the ResTable.
Bug:14902008
Change-Id: I5e04ebf967c60b78c511dd175785a13bca52f09a
Diffstat (limited to 'tools/aapt/Command.cpp')
| -rw-r--r-- | tools/aapt/Command.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index 4e0a9fecf8a5..cc0da1568eb8 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -634,6 +634,9 @@ int doDump(Bundle* bundle) if (&res == NULL) { fprintf(stderr, "ERROR: dump failed because no resource table was found\n"); goto bail; + } else if (res.getError() != NO_ERROR) { + fprintf(stderr, "ERROR: dump failed because the resource table is invalid/corrupt.\n"); + goto bail; } if (strcmp("resources", option) == 0) { |