Message ID | 20200821075514.20406-1-sonnysasaka@chromium.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [BlueZ] sixaxis: Fix a crash caused by the return of udev_device_get_property_value | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. While we are preparing for reviewing the patches, we found the following issue/warning. Test Result: checkgitlint Failed Outputs: 1: T1 Title exceeds max length (75>72): "sixaxis: Fix a crash caused by the return of udev_device_get_property_value" --- Regards, Linux Bluetooth
diff --git a/plugins/sixaxis.c b/plugins/sixaxis.c index 939fed759..996f85dd6 100644 --- a/plugins/sixaxis.c +++ b/plugins/sixaxis.c @@ -411,7 +411,7 @@ get_pairing_type_for_device(struct udev_device *udevice, uint16_t *bus, hid_id = udev_device_get_property_value(hid_parent, "HID_ID"); - if (sscanf(hid_id, "%hx:%hx:%hx", bus, &vid, &pid) != 3) + if (!hid_id || sscanf(hid_id, "%hx:%hx:%hx", bus, &vid, &pid) != 3) return NULL; cp = get_pairing(vid, pid);