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
committerAnthony G. Basile <blueness@gentoo.org>2013-03-14 18:22:46 -0400
commit2ba4b1107835087a0f994f83ca4b0ee22e1227da (patch)
tree59dde675cc3d2fd9acd996ed323ca67f382ff046 /src/udev/udev-builtin-usb_id.c
parent26eb5714e99de5b37a8a646d98677829be4d57e4 (diff)
udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
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 e020f8198f..ce9ffe7db8 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];