Michael Tokarev wrote:
Randy.Dunlap wrote:
[]

diff -Naurp ./drivers/usb/input/hid-core.c~hid_buf_over ./drivers/usb/input/hid-core.c
--- ./drivers/usb/input/hid-core.c~hid_buf_over 2005-01-22 17:11:12.000000000 -0800
+++ ./drivers/usb/input/hid-core.c 2005-01-29 19:04:18.000000000 -0800
@@ -1727,7 +1727,7 @@ static struct hid_device *usb_hid_config
strcat(hid->name, buf);
if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0)
snprintf(hid->name, 64, "%s %s", hid->name, buf);
- } else if (usb_string(dev, dev->descriptor.iProduct, buf, 128) > 0) {
+ } else if (usb_string(dev, dev->descriptor.iProduct, buf, 64) > 0) {
snprintf(hid->name, 128, "%s", buf);
} else
snprintf(hid->name, 128, "%04x:%04x",


We have sizeof(), don't we?  Ie, why
  snprintf(hid->name, 128, "%s", buf);
instead of
  snprintf(hid->name, sizeof(hid->name), "%s", buf);
and
  usb_string(dev, dev->descriptor.iProduct, buf, sizeof(buf))
and the like?

That's a different patch. You want to submit it? Go for it. And yes, it does need to be done.

--
~Randy


------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to