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

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

Merge "eglGetProcAddressImpl(): Validate procname is non-null" into main

parents d8928147 72cd929d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1196,6 +1196,12 @@ static __eglMustCastToProperFunctionPointerType findBuiltinWrapper(const char* p
}

__eglMustCastToProperFunctionPointerType eglGetProcAddressImpl(const char* procname) {
    // This is not required by the EGL spec, but we're choosing to fail gracefully (return nullptr)
    // rather than performing undefined behavior (crashing).
    if (procname == nullptr) {
        return nullptr;
    }

    if (FILTER_EXTENSIONS(procname)) {
        return nullptr;
    }