mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-27 22:37:15 +00:00
logitech-hidpp: Read from the device in a more safe way
This commit is contained in:
parent
4ae9aa87df
commit
925f2e914b
@ -861,7 +861,9 @@ fu_logitech_hidpp_peripheral_write_firmware_pkt (FuLogitechHidPpPeripheral *self
|
||||
}
|
||||
|
||||
/* check error */
|
||||
packet_cnt = fu_common_read_uint32 (msg->data, G_BIG_ENDIAN);
|
||||
if (!fu_common_read_uint32_safe (msg->data, sizeof(msg->data), 0x0,
|
||||
&packet_cnt, G_BIG_ENDIAN, error))
|
||||
return FALSE;
|
||||
g_debug ("packet_cnt=0x%04x", packet_cnt);
|
||||
if (fu_logitech_hidpp_peripheral_check_status (msg->data[4], &error_local))
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user