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

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