libftdi Archives

Subject: PATCH: Null pointer in libftdi when used with libusb-win32 x64 drivers on Win64 systems

From: "Redirect \"Slash\" NIL" <redirect.slash.nil@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 13 Oct 2009 13:28:50 +0100
Hello all,

I have uncovered the following issue when compiling OpenOCD with libftdi/libusb-win32 on a Windows 64bit system using the WPG System64 (MinGW x64) toolchain.

It is possible for dev->config to be NULL despite dev->descriptor.bNumConfigurations > 0, when trying to access dev->config[0].bConfigurationValue in ftdi_usb_open_dev().
This happens when using libusb-win32 on a Win64 platform, which results in a NULL pointer exception.

The attached patch addresses the issue.

Regards,

>NIL:






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


Attachment: patch_libusb-win32_x64.diff
Description: Binary data

Current Thread
  • PATCH: Null pointer in libftdi when used with libusb-win32 x64 drivers on Win64 systems, Redirect \"Slash\" NIL <=