Merge "Fix a nullness warning."

am: b37e81d3cd

Change-Id: I0393f42a1d2a0e73e0c29a0e0047479f49982788
This commit is contained in:
Yunlian Jiang
2016-10-11 19:35:31 +00:00
committed by android-build-merger

View File

@@ -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);
}