Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] usbutils 0.91: Fix NULL pointer crash.
@ 2012-07-27 12:03 rongqing.li
  2012-07-29  9:22 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2012-07-27 12:03 UTC (permalink / raw)
  To: openembedded-core

From: Roy.Li <rongqing.li@windriver.com>

[YOCTO #2847]

Before use usbbuslist, we should check if it is valid.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 .../usbutils/usbutils/Fix-NULL-pointer-crash.patch |   28 ++++++++++++++++++++
 meta/recipes-bsp/usbutils/usbutils_0.91.bb         |    5 ++-
 2 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch

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 0000000..f5ad2b2
--- /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
+
diff --git a/meta/recipes-bsp/usbutils/usbutils_0.91.bb b/meta/recipes-bsp/usbutils/usbutils_0.91.bb
index 04d1681..abe807c 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+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 DEPENDS = "libusb zlib"
-PR = "r4"
+PR = "r5"
 
 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[sha256sum] = "c122346b0225121bcf159abf804116f826a4a3462c94ce7b8871f7559e6b3a46"
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] usbutils 0.91: Fix NULL pointer crash.
  2012-07-27 12:03 [PATCH 1/1] usbutils 0.91: Fix NULL pointer crash rongqing.li
@ 2012-07-29  9:22 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-07-29  9:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-07-27 at 20:03 +0800, rongqing.li@windriver.com wrote:
> From: Roy.Li <rongqing.li@windriver.com>
> 
> [YOCTO #2847]
> 
> Before use usbbuslist, we should check if it is valid.
> 
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
>  .../usbutils/usbutils/Fix-NULL-pointer-crash.patch |   28 ++++++++++++++++++++
>  meta/recipes-bsp/usbutils/usbutils_0.91.bb         |    5 ++-
>  2 files changed, 31 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-bsp/usbutils/usbutils/Fix-NULL-pointer-crash.patch


Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-29  9:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 12:03 [PATCH 1/1] usbutils 0.91: Fix NULL pointer crash rongqing.li
2012-07-29  9:22 ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox