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

Commit ad3bdaf7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Vulkan: Avoid buffer overflow by ignoring duplicate extensions" into...

Merge "Vulkan: Avoid buffer overflow by ignoring duplicate extensions" into udc-qpr-dev am: 1700661a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/24392472



Change-Id: I6c1841e31896563e636a98f4435a1925c7d64b0c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ebd5ab19 1700661a
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -763,6 +763,17 @@ void CreateInfoWrapper::FilterExtension(const char* name) {
            continue;
            continue;
        }
        }


        // Ignore duplicate extensions (see: b/288929054)
        bool duplicate_entry = false;
        for (uint32_t j = 0; j < filter.name_count; j++) {
            if (strcmp(name, filter.names[j]) == 0) {
                duplicate_entry = true;
                break;
            }
        }
        if (duplicate_entry == true)
            continue;

        filter.names[filter.name_count++] = name;
        filter.names[filter.name_count++] = name;
        if (ext_bit != ProcHook::EXTENSION_UNKNOWN) {
        if (ext_bit != ProcHook::EXTENSION_UNKNOWN) {
            if (ext_bit == ProcHook::ANDROID_native_buffer)
            if (ext_bit == ProcHook::ANDROID_native_buffer)