PERFORCE change 143877 for review
Weongyo Jeong
weongyo at FreeBSD.org
Sat Jun 21 13:33:11 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=143877
Change 143877 by weongyo at weongyo_ws on 2008/06/21 13:32:41
choice a smaller buffer to save the config descriptors that this
provents a overwrite if the buffer to save is smaller than the
total size of config descriptors.
Affected files ...
.. //depot/projects/ndisusb/sys/compat/ndis/subr_usbd.c#7 edit
Differences ...
==== //depot/projects/ndisusb/sys/compat/ndis/subr_usbd.c#7 (text+ko) ====
@@ -368,7 +368,7 @@
ctldesc->ucd_trans_buflen = 0;
return usbd_usb2urb(status);
}
- len = UGETW(cd.wTotalLength);
+ len = MIN(UGETW(cd.wTotalLength), ctldesc->ucd_trans_buflen);
/* Get the full descriptor. Try a few times for slow devices. */
for (i = 0; i < 3; i++) {
status = usbd_get_desc(uaa->device,
More information about the p4-projects
mailing list