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

Commit 9f8b9ae2 authored by Jinguang Dong's avatar Jinguang Dong
Browse files

surfaceflinger:Fix potential crash issue when do AIDL FUZZ

test

There will be trigger exception when we provide invalid
inputs parameter for surfaceflinger  JNI interface

Test: 1.Run adb shell and open AIDLer tools;
      2.change to Dir /sdcard/elong.AIDLer
      3.run commond service list > service_list.txt
      4.Rerun AIDL FUZZ test

Change-Id: I0a63adc1e8ae5d9c9e43cb6df6aa13503c40a0c5
parent b29c82b6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -646,6 +646,10 @@ status_t SurfaceFlinger::getDisplayStats(const sp<IBinder>& /* display */,
}

int SurfaceFlinger::getActiveConfig(const sp<IBinder>& display) {
    if (display == NULL) {
        ALOGE("%s : display is NULL", __func__);
        return BAD_VALUE;
    }
    sp<DisplayDevice> device(getDisplayDevice(display));
    if (device != NULL) {
        return device->getActiveConfig();