From 7962afbba9016ea03d9f2987fee341443fcde39d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Sun, 17 Feb 2013 21:16:56 +0100 Subject: [PATCH] udev: usb_id: parse only 'size' bytes of the 'descriptors' buffer Signed-off-by: Robert Milasan --- src/udev/udev-builtin-usb_id.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Index: systemd-195/src/udev/udev-builtin-usb_id.c =================================================================== --- systemd-195.orig/src/udev/udev-builtin-usb_id.c +++ systemd-195/src/udev/udev-builtin-usb_id.c @@ -210,7 +210,7 @@ static int dev_if_packed_info(struct ude 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];