mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Fix UHID_OUTPUT message parsing
The bounds check was incorrect. Fixes #6415 <https://github.com/Genymobile/scrcpy/issues/6415>
This commit is contained in:
parent
9d7a4c88e0
commit
3e40b24737
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ sc_device_msg_deserialize(const uint8_t *buf, size_t len,
|
|||
}
|
||||
uint16_t id = sc_read16be(&buf[1]);
|
||||
size_t size = sc_read16be(&buf[3]);
|
||||
if (size < len - 5) {
|
||||
if (size > len - 5) {
|
||||
return 0; // not available
|
||||
}
|
||||
uint8_t *data = malloc(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue