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

Commit e36d57bc 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 main am: 64b1cfe2

parents 323d3e4d 64b1cfe2
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -747,6 +747,17 @@ void CreateInfoWrapper::FilterExtension(const char* name) {
        if (strcmp(name, props.extensionName) != 0)
            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;
        if (ext_bit != ProcHook::EXTENSION_UNKNOWN) {
            if (ext_bit == ProcHook::ANDROID_native_buffer)