[Pkg-utopia-commits] r1872 - in /packages/unstable/hal/debian: changelog patches/81_dont_deref_reason_why_locked_if_null.patch

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Sun Nov 25 12:12:06 UTC 2007


Author: sjoerd
Date: Sun Nov 25 12:12:06 2007
New Revision: 1872

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=1872
Log:
* debian/patches/81_dont_deref_reason_why_locked_if_null.patch
  - Added. If dbus_malloc0 failed (returned NULL), don't deref the NULL
  pointer.

Added:
    packages/unstable/hal/debian/patches/81_dont_deref_reason_why_locked_if_null.patch
Modified:
    packages/unstable/hal/debian/changelog

Modified: packages/unstable/hal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/changelog?rev=1872&op=diff
==============================================================================
--- packages/unstable/hal/debian/changelog (original)
+++ packages/unstable/hal/debian/changelog Sun Nov 25 12:12:06 2007
@@ -11,6 +11,9 @@
     - Added. Fixes int_outof match target in fdi files (from upstream git)
   * debian/patches/70_killswitch_dell.patch
     - Replaced by the version as applied to upstream git.
+  * debian/patches/81_dont_deref_reason_why_locked_if_null.patch
+    - Added. If dbus_malloc0 failed (returned NULL), don't deref the NULL
+    pointer.
 
  -- Michael Biebl <biebl at debian.org>  Wed, 24 Oct 2007 16:19:33 +0200
 

Added: packages/unstable/hal/debian/patches/81_dont_deref_reason_why_locked_if_null.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/hal/debian/patches/81_dont_deref_reason_why_locked_if_null.patch?rev=1872&op=file
==============================================================================
--- packages/unstable/hal/debian/patches/81_dont_deref_reason_why_locked_if_null.patch (added)
+++ packages/unstable/hal/debian/patches/81_dont_deref_reason_why_locked_if_null.patch Sun Nov 25 12:12:06 2007
@@ -1,0 +1,22 @@
+commit 522f8bede85239dc0279a94d0b1e9c1da4e601f6
+Author: Guillem Jover <guillem.jover at nokia.com>
+Date:   Tue Nov 20 14:50:43 2007 +0100
+
+    libhal: do not dereference *reason_why_locked if it's NULL
+    
+    Do not dereference *reason_why_locked if it's NULL after call
+    dbus_malloc0().
+
+diff --git a/libhal/libhal.c b/libhal/libhal.c
+index 619b7a5..2697239 100644
+--- a/libhal/libhal.c
++++ b/libhal/libhal.c
+@@ -2279,6 +2279,8 @@ libhal_device_lock (LibHalContext *ctx,
+ 			if (reason_why_locked != NULL) {
+ 				*reason_why_locked =
+ 					dbus_malloc0 (strlen (error->message) + 1);
++				if (*reason_why_locked == NULL)
++					return FALSE;
+ 				strcpy (*reason_why_locked, error->message);
+ 			}
+ 		}




More information about the Pkg-utopia-commits mailing list