Commit a6fc631d authored by Pavel Roskin's avatar Pavel Roskin Committed by Greg Kroah-Hartman

[PATCH] USB: name uninitialized in scanner.c

Linux 2.5.69-bk18 prints something strange to the kernel log when the USB
scanner is attached.  It turns out drivers/usb/image/scanner.c uses
uninitialized variable "name" in probe_scanner() in the printk() call.
That means that random memory is read and output to the kernel log.
parent f67f19b7
...@@ -1106,6 +1106,9 @@ probe_scanner(struct usb_interface *intf, ...@@ -1106,6 +1106,9 @@ probe_scanner(struct usb_interface *intf,
scn->scn_minor = intf->minor; scn->scn_minor = intf->minor;
scn->isopen = 0; scn->isopen = 0;
snprintf(name, sizeof(name), scanner_class.name,
intf->minor - scanner_class.minor_base);
info ("USB scanner device (0x%04x/0x%04x) now attached to %s", info ("USB scanner device (0x%04x/0x%04x) now attached to %s",
dev->descriptor.idVendor, dev->descriptor.idProduct, name); dev->descriptor.idVendor, dev->descriptor.idProduct, name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment