usb-serial.c question - potential Memory fault

<[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <019c01c7d268$02879460$0796bd20$@com>
Hi Greg,

After a new complete reading of my code against usb-serial.c, I finally
found ( I hope ) my problem.
In usb-serial.c, when bulk_in/out buffers are initialized, each  buffer size
are the same as the wMaxPacketSize given by the endpoint.
So, in my case, my device have a value of 64 bytes and I send and receive
bulk data that might have 256 bytes length !!! And like pl2303, I just copy
the user data to port->write_urb->transfer_buffer.
For all driver that use usb-serial for the probe function, this can be a
problem (like for me). I have checked for example the pl2303 that never
check this value before the memcpy.

Am I right ? This can be problem or not ?

Alain 




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.