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

Commit 1700661a authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

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

parents b381a8ba 3b48e157
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -763,6 +763,17 @@ void CreateInfoWrapper::FilterExtension(const char* name) {
            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)