[maemo-commits] [maemo-commits] r14621 - in projects/haf/trunk/dbus/debian: . patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Oct 25 17:42:13 EEST 2007
Author: kihamala
Date: 2007-10-25 17:42:11 +0300 (Thu, 25 Oct 2007)
New Revision: 14621

Added:
   projects/haf/trunk/dbus/debian/patches/28-add-oom-check.patch
Modified:
   projects/haf/trunk/dbus/debian/changelog
Log:
add one more OOM check


Modified: projects/haf/trunk/dbus/debian/changelog
===================================================================
--- projects/haf/trunk/dbus/debian/changelog	2007-10-25 14:01:35 UTC (rev 14620)
+++ projects/haf/trunk/dbus/debian/changelog	2007-10-25 14:42:11 UTC (rev 14621)
@@ -14,6 +14,7 @@
     variable is smaller than zero.
   * Transform dead code into working code in
     _dbus_connection_get_next_client_serial.
+  * Add one more OOM check to return_uuid.
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Thu, 18 Oct 2007 11:21:11 +0300
 

Added: projects/haf/trunk/dbus/debian/patches/28-add-oom-check.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/28-add-oom-check.patch	2007-10-25 14:01:35 UTC (rev 14620)
+++ projects/haf/trunk/dbus/debian/patches/28-add-oom-check.patch	2007-10-25 14:42:11 UTC (rev 14621)
@@ -0,0 +1,16 @@
+diff -pur dbus-1.0.2/dbus/dbus-uuidgen.c dbus-1.0.2.new/dbus/dbus-uuidgen.c
+--- dbus-1.0.2/dbus/dbus-uuidgen.c	2006-12-11 21:21:09.000000000 +0200
++++ dbus-1.0.2.new/dbus/dbus-uuidgen.c	2007-10-25 17:39:54.271477472 +0300
+@@ -48,7 +48,11 @@ return_uuid (DBusGUID   *uuid,
+   if (uuid_p)
+     {
+       DBusString encoded;
+-      _dbus_string_init (&encoded);
++      if (!_dbus_string_init (&encoded))
++        {
++          _DBUS_SET_OOM (error);
++          return FALSE;
++        }
+       if (!_dbus_uuid_encode (uuid, &encoded) ||
+           !_dbus_string_steal_data (&encoded, uuid_p))
+         {


More information about the maemo-commits mailing list