diff options
author | Roy.Li <rongqing.li@windriver.com> | 2012-07-27 20:03:07 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-29 10:16:15 +0100 |
commit | a18b397a3ea101083ff8249f7f0ac16e1b2e9a2c (patch) | |
tree | c6b0eb19705df49adc6e6d99c3e4d7acac7efd99 /meta/recipes-bsp | |
parent | 2b40ca14b4eb811b1c2c545b97aa9534077a6578 (diff) | |
download | poky-a18b397a3ea101083ff8249f7f0ac16e1b2e9a2c.tar.gz |
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>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r-- | meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch | 28 | ||||
-rw-r--r-- | meta/recipes-bsp/usbutils/usbutils_0.91.bb | 5 |
2 files changed, 31 insertions, 2 deletions
diff --git a/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch b/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch new file mode 100644 index 0000000000..0efdc59fc6 --- /dev/null +++ b/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Fix NULL pointer crash. | ||
2 | |||
3 | Before use usbbuslist, we should check if it is valid. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
7 | --- | ||
8 | lsusb-t.c | 4 ++++ | ||
9 | 1 files changed, 4 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/lsusb-t.c b/lsusb-t.c | ||
12 | index f604155..583a46a 100644 | ||
13 | --- a/lsusb-t.c | ||
14 | +++ b/lsusb-t.c | ||
15 | @@ -643,6 +643,10 @@ static void sort_busses(void) | ||
16 | /* need to reverse sort bus numbers */ | ||
17 | struct usbbusnode *t, *p, **pp; | ||
18 | int swapped; | ||
19 | + | ||
20 | + if (!usbbuslist) | ||
21 | + return; | ||
22 | + | ||
23 | do { | ||
24 | p = usbbuslist; | ||
25 | pp = &usbbuslist; | ||
26 | -- | ||
27 | 1.7.4.1 | ||
28 | |||
diff --git a/meta/recipes-bsp/usbutils/usbutils_0.91.bb b/meta/recipes-bsp/usbutils/usbutils_0.91.bb index 04d1681e1d..abe807cd33 100644 --- a/meta/recipes-bsp/usbutils/usbutils_0.91.bb +++ b/meta/recipes-bsp/usbutils/usbutils_0.91.bb | |||
@@ -7,10 +7,11 @@ LICENSE = "GPLv2+" | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
8 | 8 | ||
9 | DEPENDS = "libusb zlib" | 9 | DEPENDS = "libusb zlib" |
10 | PR = "r4" | 10 | PR = "r5" |
11 | 11 | ||
12 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ | 12 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \ |
13 | file://usb-devices-avoid-dependency-on-bash.patch" | 13 | file://usb-devices-avoid-dependency-on-bash.patch \ |
14 | file://Fix-NULL-pointer-crash.patch" | ||
14 | 15 | ||
15 | SRC_URI[md5sum] = "49de2403b40bf3a9863faaa8d3858deb" | 16 | SRC_URI[md5sum] = "49de2403b40bf3a9863faaa8d3858deb" |
16 | SRC_URI[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46" | 17 | SRC_URI[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46" |