Merge "Reject bad ResXMLTree::setTo calls"

This commit is contained in:
Kenny Root
2012-10-12 23:46:14 -07:00
committed by Gerrit Code Review

View File

@@ -1209,6 +1209,10 @@ status_t ResXMLTree::setTo(const void* data, size_t size, bool copyData)
uninit();
mEventCode = START_DOCUMENT;
if (!data || !size) {
return (mError=BAD_TYPE);
}
if (copyData) {
mOwnedData = malloc(size);
if (mOwnedData == NULL) {