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

Commit 5b26fdfd authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Don't process objects with empty name am: 7ea72dcd am: 0e0ca2a4

am: ddb2a28a

Change-Id: I902fda725304d8dbf9f97f81d1554198d21452c1
parents 87c2e38c ddb2a28a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -927,6 +927,10 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
    if (!mData.getUInt32(temp32)) return MTP_RESPONSE_INVALID_PARAMETER;  // sequence number
    MtpStringBuffer name, created, modified;
    if (!mData.getString(name)) return MTP_RESPONSE_INVALID_PARAMETER;    // file name
    if (name.getCharCount() == 0) {
        ALOGE("empty name");
        return MTP_RESPONSE_INVALID_PARAMETER;
    }
    if (!mData.getString(created)) return MTP_RESPONSE_INVALID_PARAMETER;      // date created
    if (!mData.getString(modified)) return MTP_RESPONSE_INVALID_PARAMETER;     // date modified
    // keywords follow