On Sat, 2007-03-10 at 15:39 -0800, Phil Dibowitz wrote: > while (bytes = read((int)fh, buf, SIZE)) { > printf("writing %d bytes (%d)\n",SIZE,++i); > if (usb_interrupt_write(udev, OUT_EP, buf, bytes, 2) < 0) {
read can return -1, at which point you stuff -1 into usb_interrupt_write, which likely interprets the length as an unsigned quantity, causing EFAULT. Tom ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel