Package: libglib2.0-0
Version: 2.30.2-6
Severity: normal
Tags: patch upstream

g_settings_backend() doesn't check if backend is non-NULL before
dereferencing the pointer. The patch is attached.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-rc7-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libglib2.0-0 depends on:
ii  libc6              2.13-7          
ii  libffi5            3.0.10-3        
ii  libpcre3           8.12-4          
ii  libselinux1        2.0.89-4        
ii  multiarch-support  2.13-21         
ii  zlib1g             1:1.2.3.4.dfsg-3

Versions of packages libglib2.0-0 recommends:
ii  libglib2.0-data   2.24.2-1
ii  shared-mime-info  0.90-1  

libglib2.0-0 suggests no packages.

-- no debconf information
Description: Prevent NULL pointer dereference in g_settings_backend_unsubscribe
 Check if backend is NULL.
Author: Andrew Shadura <bugzi...@tut.by>

--- a/gio/gsettingsbackend.c
+++ b/gio/gsettingsbackend.c
@@ -855,8 +855,9 @@
 g_settings_backend_unsubscribe (GSettingsBackend *backend,
                                 const char       *name)
 {
-  G_SETTINGS_BACKEND_GET_CLASS (backend)
-    ->unsubscribe (backend, name);
+  if (backend != NULL)
+    G_SETTINGS_BACKEND_GET_CLASS (backend)
+      ->unsubscribe (backend, name);
 }
 
 /*< private >

Reply via email to