mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
usbutils 0.91: Fix NULL pointer crash.
[YOCTO #2847] Before use usbbuslist, we should check if it is valid. (From OE-Core rev: fc6c6ce73105518f4106da469ed81d53d860a290) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
Fix NULL pointer crash.
|
||||||
|
|
||||||
|
Before use usbbuslist, we should check if it is valid.
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
|
||||||
|
---
|
||||||
|
lsusb-t.c | 4 ++++
|
||||||
|
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lsusb-t.c b/lsusb-t.c
|
||||||
|
index f604155..583a46a 100644
|
||||||
|
--- a/lsusb-t.c
|
||||||
|
+++ b/lsusb-t.c
|
||||||
|
@@ -643,6 +643,10 @@ static void sort_busses(void)
|
||||||
|
/* need to reverse sort bus numbers */
|
||||||
|
struct usbbusnode *t, *p, **pp;
|
||||||
|
int swapped;
|
||||||
|
+
|
||||||
|
+ if (!usbbuslist)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
do {
|
||||||
|
p = usbbuslist;
|
||||||
|
pp = &usbbuslist;
|
||||||
|
--
|
||||||
|
1.7.4.1
|
||||||
|
|
||||||
@@ -7,10 +7,11 @@ LICENSE = "GPLv2+"
|
|||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||||
|
|
||||||
DEPENDS = "libusb zlib"
|
DEPENDS = "libusb zlib"
|
||||||
PR = "r4"
|
PR = "r5"
|
||||||
|
|
||||||
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
|
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
|
||||||
file://usb-devices-avoid-dependency-on-bash.patch"
|
file://usb-devices-avoid-dependency-on-bash.patch \
|
||||||
|
file://Fix-NULL-pointer-crash.patch"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "49de2403b40bf3a9863faaa8d3858deb"
|
SRC_URI[md5sum] = "49de2403b40bf3a9863faaa8d3858deb"
|
||||||
SRC_URI[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46"
|
SRC_URI[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46"
|
||||||
|
|||||||
Reference in New Issue
Block a user