aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/usbutils/usbutils
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2012-07-27 20:03:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-28 11:17:01 +0100
commitfc6c6ce73105518f4106da469ed81d53d860a290 (patch)
tree75590992f6abd696a934ed903b46b4905bc0beda /meta/recipes-bsp/usbutils/usbutils
parente82b4fe82689c760c4910ebfc9aed6e3d9e1a2a1 (diff)
downloadopenembedded-core-contrib-fc6c6ce73105518f4106da469ed81d53d860a290.tar.gz
usbutils 0.91: Fix NULL pointer crash.
[YOCTO #2847] Before use usbbuslist, we should check if it is valid. Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/usbutils/usbutils')
-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 @@
+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
+