aboutsummaryrefslogtreecommitdiffstats
path: root/tools/zipalign
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2016-10-04 17:23:03 -0700
committerGeorge Burgess IV <gbiv@google.com>2016-10-05 10:52:35 -0700
commit4f1a91cbacf0fb46e8eec586bba1209a9514896e (patch)
tree7568b2dbbc312e1258b6827f5e42b8431297e49d /tools/zipalign
parenta8c8dadd09f12d21a432fd9777bb894f207d6420 (diff)
downloadplatform_build-4f1a91cbacf0fb46e8eec586bba1209a9514896e.tar.gz
platform_build-4f1a91cbacf0fb46e8eec586bba1209a9514896e.tar.bz2
platform_build-4f1a91cbacf0fb46e8eec586bba1209a9514896e.zip
Fix a nullness warning.
This silences a warning null pointer passed as an argument to a 'nonnull' parameter BUG=None Test: The warning is gone. Change-Id: I10a17d4674bfb373d7fe8666863abd5f10a4d11f
Diffstat (limited to 'tools/zipalign')
-rw-r--r--tools/zipalign/ZipEntry.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/zipalign/ZipEntry.cpp b/tools/zipalign/ZipEntry.cpp
index 2f33e23054..a9c2d33107 100644
--- a/tools/zipalign/ZipEntry.cpp
+++ b/tools/zipalign/ZipEntry.cpp
@@ -130,6 +130,7 @@ void ZipEntry::initNew(const char* fileName, const char* comment)
if (mCDE.mFileCommentLength > 0) {
/* TODO: stop assuming null-terminated ASCII here? */
mCDE.mFileComment = new uint8_t[mCDE.mFileCommentLength+1];
+ assert(comment != NULL);
strcpy((char*) mCDE.mFileComment, comment);
}