summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch
downloadpoky-c527fd1f14c27855a37f2e8ac5346ce8d940ced2.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch')
-rw-r--r--meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch28
1 files changed, 28 insertions, 0 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 @@
1Fix NULL pointer crash.
2
3Before use usbbuslist, we should check if it is valid.
4
5Upstream-Status: Pending
6Signed-off-by: Roy.Li <rongqing.li@windriver.com>
7---
8 lsusb-t.c | 4 ++++
9 1 files changed, 4 insertions(+), 0 deletions(-)
10
11diff --git a/lsusb-t.c b/lsusb-t.c
12index 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--
271.7.4.1
28