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

Commit 721af5b6 authored by Steven Moreland's avatar Steven Moreland Committed by Pawan Wagh
Browse files

libbinder_ndk: allow null codeToFunction.

If this is null (as in the fuzzer), it crashes.

Bug: N/A
Test: N/A
Change-Id: Icd0107d1fada88abad3375d619b672cae64190db
parent 0d6e60f8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -292,7 +292,10 @@ AIBinder_Class* ICInterface::defineClass(const char* interfaceDescriptor,
#if !defined(__ANDROID_PRODUCT__) && \
        (defined(__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__) || __ANDROID_API__ >= 36)
    if API_LEVEL_AT_LEAST (36, 202504) {
        AIBinder_Class_setTransactionCodeToFunctionNameMap(clazz, codeToFunction, functionCount);
        if (codeToFunction != nullptr) {
            AIBinder_Class_setTransactionCodeToFunctionNameMap(clazz, codeToFunction,
                                                               functionCount);
        }
    }
#else
    (void)codeToFunction;