| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This makes `reuse lint` happy as well as license lawyers...
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
Cliff Biffle points out that some devices lie about the length of their
string, so we end up with stack data in the string buffer, which is then
displayed by userspace. Fix this up by initializing the data to 0 first
before reading from the device.
Reported-by: Cliff L. Biffle <code@cliffle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
| |
Use the C standard uint*_t variable types, not the "unix" types of
u_int*_t as we should be able to all finally agree on one type of C
variables.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
| |
gcc-8 pointed out that this could be a problem. It really isn't, given
that PATH_MAX is being used, but just to make things simpler, let
strncpy() think it has a smaller buffer than it really does.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
This removes the "boiler-plate" license texts in the individual files to
use SPDX identifiers instead. Cleans up the text a lot.
All copyright notices were left intact, as this does not change
anything.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
| |
Fixed the issue in displaying lengthy string descriptor (more than 128 bytes)
Signed-off-by: Muthu M <muthu.lnx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This Ralink Wi-Fi adapter reports bogus values for some string
descriptors (iSerial and iInterface). As the current
libusb_get_string_descriptor function from 1.0.17 does not validate the
length or type and returns 254 even if the descriptor says 0, explicitly
check the fields before proceeding.
Fixes the following crash:
lsusb: gconv.c:74: __gconv: Assertion `outbuf != ((void *)0) && *outbuf != ((void *)0)' failed.
libusbx bug: https://github.com/libusbx/libusbx/pull/156
Signed-off-by: Peter Wu <lekensteyn@gmail.com>
|
|
|
|
|
|
|
| |
This replaces the get_string function with get_dev_string, which
obtains the string descriptor in raw UTF-16 and attempts to iconv
it to the current locale's encoding. If that fails, or if the system
lacks the required functions, it falls back to ASCII.
|
|
|
|
|
|
|
|
| |
Because readlink() does not null-terminate buffer, only return
number of written chars, thare is possibility that buf[ret] = 0;
will write to unallocated area.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
|
|
|
| |
This keeps us from having to track the movements of them, as that's a
pointless exercise.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
|
|
|
|
|
| |
lsusb doesn't compile for me unless I add this header file. This is an
older development system (Ubuntu 9.04), so I'm not sure what combo of dev
packages is to blame.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
|
|
|
| |
We need to eat our own dog food.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a couple of cases, we fail to include config.h before all standard
header files. As configure.ac specifies AC_SYS_LARGEFILE, config.h can
define things like _FILE_OFFSET_BITS=64, which must be defined before
all standard headers are included. Changing this in the middle of
compilation confuses things like zlib, and can lead to compilation
failures:
In file included from names.c:42:
/usr/include/32/zlib.h:1583: error: conflicting types for 'gzseek64'
/usr/include/32/zlib.h:1567: note: previous declaration of 'gzseek64' was here
/usr/include/32/zlib.h:1584: error: conflicting types for 'gztell64'
/usr/include/32/zlib.h:1568: note: previous declaration of 'gztell64' was here
/usr/include/32/zlib.h:1585: error: conflicting types for 'gzoffset64'
/usr/include/32/zlib.h:1569: note: previous declaration of 'gzoffset64' was here
/usr/include/32/zlib.h:1586: error: conflicting types for 'adler32_combine64'
/usr/include/32/zlib.h:1570: note: previous declaration of 'adler32_combine64' was here
/usr/include/32/zlib.h:1587: error: conflicting types for 'crc32_combine64'
/usr/include/32/zlib.h:1571: note: previous declaration of 'crc32_combine64' was here
make[1]: *** [lsusb-names.o] Error 1
The fix is to include it first.
Signed-off-by: Nick Alcock <nix@esperi.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
|
|
| |
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
| |
|
| |
|
|
|