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

Commit cd1734a7 authored by Kevin Rocard's avatar Kevin Rocard Committed by android-build-merger
Browse files

libaudiohal: Fix dereference before NULL check am: 5915fa32

am: 88186b6c

Change-Id: Ia8ea3bbd057236fc8db89b40a65db88c059fbd09
parents 52d06b24 88186b6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ status_t deviceAddressFromHal(
        audio_devices_t device, const char* halAddress, DeviceAddress* address) {
    address->device = AudioDevice(device);

    if (address == nullptr || strnlen(halAddress, AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
    if (halAddress == nullptr || strnlen(halAddress, AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
        return OK;
    }
    const bool isInput = (device & AUDIO_DEVICE_BIT_IN) != 0;
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ status_t deviceAddressFromHal(
        audio_devices_t device, const char* halAddress, DeviceAddress* address) {
    address->device = AudioDevice(device);

    if (address == nullptr || strnlen(halAddress, AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
    if (halAddress == nullptr || strnlen(halAddress, AUDIO_DEVICE_MAX_ADDRESS_LEN) == 0) {
        return OK;
    }
    const bool isInput = (device & AUDIO_DEVICE_BIT_IN) != 0;