summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-usb_id.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-02-17 21:16:56 +0100
committerKay Sievers <kay@vrfy.org>2013-02-17 21:16:56 +0100
commit7962afbba9016ea03d9f2987fee341443fcde39d (patch)
tree9bfe7eda4cf85f495634e6e3b492e8347f482317 /src/udev/udev-builtin-usb_id.c
parenta2cbfd5916ee13b216a314826083e4c4e06930d1 (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.c2
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];