diff options
author | Kay Sievers <kay@vrfy.org> | 2013-02-17 21:16:56 +0100 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2013-02-17 21:16:56 +0100 |
commit | 7962afbba9016ea03d9f2987fee341443fcde39d (patch) | |
tree | 9bfe7eda4cf85f495634e6e3b492e8347f482317 /src/udev/udev-builtin-usb_id.c | |
parent | a2cbfd5916ee13b216a314826083e4c4e06930d1 (diff) |
udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer
Diffstat (limited to 'src/udev/udev-builtin-usb_id.c')
-rw-r--r-- | src/udev/udev-builtin-usb_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c index ee83d4fde9..dcb2468bf6 100644 --- a/src/udev/udev-builtin-usb_id.c +++ b/src/udev/udev-builtin-usb_id.c @@ -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]; |