Blame SOURCES/0061-dbus-fixed-abrt-dbus-memory-leaks.patch

44797e
From ca9e26aab4b78dbd0d5f59ca5e3bda47000b6353 Mon Sep 17 00:00:00 2001
44797e
From: Matej Habrnal <mhabrnal@redhat.com>
44797e
Date: Thu, 18 Sep 2014 15:02:01 +0200
44797e
Subject: [ABRT PATCH 61/66] dbus: fixed abrt-dbus memory leaks
44797e
44797e
Fixed memory leaks in abrt-dbus (method FindProblemByElementInTimeRange).
44797e
This method leaks memory if fuzzing on org.freedesktop.problems interface.
44797e
44797e
Related to rhbz#1015473
44797e
44797e
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
44797e
---
44797e
 src/dbus/abrt-dbus.c | 18 +++++++++++-------
44797e
 1 file changed, 11 insertions(+), 7 deletions(-)
44797e
44797e
diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
44797e
index 0350dee..308a9af 100644
44797e
--- a/src/dbus/abrt-dbus.c
44797e
+++ b/src/dbus/abrt-dbus.c
44797e
@@ -685,13 +685,17 @@ static void handle_method_call(GDBusConnection *connection,
44797e
 
44797e
     if (g_strcmp0(method_name, "FindProblemByElementInTimeRange") == 0)
44797e
     {
44797e
-        const char *element;
44797e
-        const char *value;
44797e
-        long timestamp_from;
44797e
-        long timestamp_to;
44797e
-        bool all;
44797e
-
44797e
-        g_variant_get(parameters, "(ssxxb)", &element, &value, &timestamp_from, &timestamp_to, &all;;
44797e
+        const gchar *element;
44797e
+        const gchar *value;
44797e
+        glong timestamp_from;
44797e
+        glong timestamp_to;
44797e
+        gboolean all;
44797e
+
44797e
+        g_variant_get_child(parameters, 0, "&s", &element);
44797e
+        g_variant_get_child(parameters, 1, "&s", &value);
44797e
+        g_variant_get_child(parameters, 2, "x", &timestamp_from);
44797e
+        g_variant_get_child(parameters, 3, "x", &timestamp_to);
44797e
+        g_variant_get_child(parameters, 4, "b", &all;;
44797e
 
44797e
         if (all && polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") == PolkitYes)
44797e
             caller_uid = 0;
44797e
-- 
44797e
1.8.3.1
44797e