diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-07-16 08:29:12 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-07-16 08:29:12 +0000 |
commit | 4eb5923d1aa09a0169f0aab8cfb458b839132f25 (patch) | |
tree | d29e1041d5757acef0079a9d43dae3ebbc16d7ec /lib/libusb/libusb20.c | |
parent | dcded131e10ee374380790a371a9129570737d20 (diff) | |
download | src-4eb5923d1aa09a0169f0aab8cfb458b839132f25.tar.gz src-4eb5923d1aa09a0169f0aab8cfb458b839132f25.zip |
- Add two missing functions to the LibUSB v0.1 API.
- Clamp the string length to 255 bytes when getting
the interface description.
- Clamp data request length to 65535 bytes when doing
control requests.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=224085
Diffstat (limited to 'lib/libusb/libusb20.c')
-rw-r--r-- | lib/libusb/libusb20.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c index 716f5403529d..b35e2bf46eb1 100644 --- a/lib/libusb/libusb20.c +++ b/lib/libusb/libusb20.c @@ -1081,6 +1081,8 @@ libusb20_dev_get_iface_desc(struct libusb20_device *pdev, if ((buf == NULL) || (len == 0)) return (LIBUSB20_ERROR_INVALID_PARAM); + buf[0] = 0; /* set default string value */ + return (pdev->beMethods->dev_get_iface_desc( pdev, iface_index, buf, len)); } |