core: Copy transfer timeout to local variable before using
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 7 May 2015 19:45:33 +0000 (12:45 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 7 May 2015 19:45:33 +0000 (12:45 -0700)
commit9b2c8abf134b96b6c1798615e0ed17991b8c0692
tree5a17bfc01c67fbe0c58533fb94a87ecf3b03f517
parent02f7f859eec8aab0b680ad18d3aabd1fe24edb28
core: Copy transfer timeout to local variable before using

The flying_transfers lock is taken in libusb_get_next_timeout()
to find the transfer with the next timeout, but the transfer was
being used outside of the lock, resulting in the possibility that
the transfer had been removed from the list and freed at the time
it was used.

Issue reported by Michel Sanches.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/io.c
libusb/version_nano.h