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

Commit bb9c2209 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "[incfs] Fix the unsafe memory copy in IncrementalService" into sc-dev

parents a499eef3 f5a6fb99
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -280,8 +280,8 @@ binder::Status BinderIncrementalService::getMetadataByPath(int32_t storageId,
}

static FileId toFileId(const std::vector<uint8_t>& id) {
    FileId fid;
    memcpy(&fid, id.data(), id.size());
    FileId fid = {};
    memcpy(&fid, id.data(), std::min(sizeof(fid), id.size()));
    return fid;
}