Date: Sat, 21 Jun 2008 13:33:10 GMT From: Weongyo Jeong <weongyo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 143877 for review Message-ID: <200806211333.m5LDXARr042919@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143877 Change 143877 by weongyo@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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806211333.m5LDXARr042919>