mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-26 09:57:26 +03:00
udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer
This commit is contained in:
parent
a2cbfd5916
commit
7962afbba9
@ -189,7 +189,7 @@ static int dev_if_packed_info(struct udev_device *dev, char *ifs_str, size_t len
|
||||
pos = 0;
|
||||
strpos = 0;
|
||||
ifs_str[0] = '\0';
|
||||
while (pos < sizeof(buf) && strpos+7 < len-2) {
|
||||
while (pos < size && strpos+7 < len-2) {
|
||||
struct usb_interface_descriptor *desc;
|
||||
char if_str[8];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user