libftdi Archives

Subject: Re: Bug in ftdi_read_data

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Uwe Bonnes <bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Aug 2010 17:42:02 +0200
Hello Hermann,

On Monday, 16. August 2010 00:12:51 Hermann Kraus wrote:
> The current git version of libftdi contains a critical bug in
> ftdi_read_data. If a read from the device returns more data than
> requested the function exits with error -127 (documented as "// never
> reached") instead of a correct return code.
> 
> The attached patch fixes this problem.

Thanks for reporting this. IIRC the code change is related to the recent 
"Let ftdi_read_data() honor usb_read_timeout" commit. The proposed fix would 
revert an intentional (?) part of Uwe's change and I guess this could
break the timeout code. Uwe, can you take a look?

Thanks,
Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread