Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82634313 authored by Kenny Root's avatar Kenny Root Committed by Gerrit Code Review
Browse files

Merge "Reject bad ResXMLTree::setTo calls"

parents cee11240 32d6aef1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) {