diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-12-09 21:43:37 +0000 |
---|---|---|
committer | Daniel Drake <dsd@gentoo.org> | 2008-12-09 21:43:37 +0000 |
commit | 4a9ac382ba5149ae5b3d0962d6a840b5e0dc13aa (patch) | |
tree | f3014fab05464982e6506785af91a59199cadad0 /libusb/os | |
parent | 81a7310d92461ba7b1d98aeff7c4c007fab07120 (diff) | |
download | libusb-4a9ac382ba5149ae5b3d0962d6a840b5e0dc13aa.tar.gz |
Linux: fix reading of active configuration
Shannon Chuang pointed out that we only read 1 byte into an
uninitialized integer, and then return the whole thing.
Diffstat (limited to 'libusb/os')
-rw-r--r-- | libusb/os/linux_usbfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c index e2c4234..ae1aae2 100644 --- a/libusb/os/linux_usbfs.c +++ b/libusb/os/linux_usbfs.c @@ -559,7 +559,7 @@ static int cache_active_config(struct libusb_device *dev, int fd, /* send a control message to retrieve active configuration */ static int usbfs_get_active_config(struct libusb_device *dev, int fd) { - int active_config; + unsigned char active_config = 0; int r; struct usbfs_ctrltransfer ctrl = { |