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

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Oct 26 11:47:42 EEST 2007
Author: kihamala
Date: 2007-10-26 11:47:40 +0300 (Fri, 26 Oct 2007)
New Revision: 14631

Added:
   projects/haf/trunk/dbus/debian/patches/32-add-oom-check-to-main.patch
Modified:
   projects/haf/trunk/dbus/debian/changelog
Log:
add missing OOM check to main.c


Modified: projects/haf/trunk/dbus/debian/changelog
===================================================================
--- projects/haf/trunk/dbus/debian/changelog	2007-10-26 08:44:22 UTC (rev 14630)
+++ projects/haf/trunk/dbus/debian/changelog	2007-10-26 08:47:40 UTC (rev 14631)
@@ -18,6 +18,7 @@
   * Add one more OOM check to _dbus_get_autolaunch_address.
   * Fixes to dbus_get_local_machine_id.
   * Add missing OOM checks to dbus-internals.c.
+  * Add missing OOM check to main.c.
 
  -- 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/32-add-oom-check-to-main.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/32-add-oom-check-to-main.patch	2007-10-26 08:44:22 UTC (rev 14630)
+++ projects/haf/trunk/dbus/debian/patches/32-add-oom-check-to-main.patch	2007-10-26 08:47:40 UTC (rev 14631)
@@ -0,0 +1,17 @@
+diff -pur dbus-1.0.2/bus/main.c dbus-1.0.2.new/bus/main.c
+--- dbus-1.0.2/bus/main.c	2006-12-11 21:21:21.000000000 +0200
++++ dbus-1.0.2.new/bus/main.c	2007-10-26 11:44:51.821615728 +0300
+@@ -149,7 +149,12 @@ handle_reload_watch (DBusWatch    *watch
+ {
+   DBusError error;
+   DBusString str;
+-  _dbus_string_init (&str);
++  if (!_dbus_string_init (&str))
++    {
++      _dbus_warn ("Out of memory.\n");
++      exit (1);
++    }
++
+   if (_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
+     {
+       _dbus_warn ("Couldn't read from reload pipe.\n");


More information about the maemo-commits mailing list