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

Commit 6e9a8c77 authored by Vadivel Thekkamalai's avatar Vadivel Thekkamalai Committed by Steve Kondik
Browse files

Bluetooth: Validate input parameters of gatt characteristics

If the input parameters of gatt characteristics are not valid
return false

Change-Id: Icf44439992cb068339f7a4c4e50a3f28c25db6ce
CRs-Fixed: 534763
parent c44187cf
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -499,6 +499,10 @@ public final class BluetoothGattServer implements BluetoothProfile {
        BluetoothGattService service = characteristic.getService();
        if (service == null) return false;

        if (characteristic == null || characteristic.getValue() == null) {
            return false;
        }

        try {
            mService.sendNotification(mServerIf, device.getAddress(),
                    service.getType(), service.getInstanceId(),