Blame SOURCES/0033-sbus-check-for-null-message-in-sbus_message_bound.patch

71e593
From 25ccb26a6c58cf7284e900588bf68ce6eec21b4c Mon Sep 17 00:00:00 2001
71e593
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
71e593
Date: Thu, 16 Aug 2018 12:57:47 +0200
71e593
Subject: [PATCH 33/47] sbus: check for null message in sbus_message_bound
71e593
71e593
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
71e593
(cherry picked from commit 30f4adf874aff174734ad77902a79fc5727ab495)
71e593
---
71e593
 src/sbus/request/sbus_message.c | 10 ++++++++++
71e593
 1 file changed, 10 insertions(+)
71e593
71e593
diff --git a/src/sbus/request/sbus_message.c b/src/sbus/request/sbus_message.c
71e593
index 950be9122610f3394d982173a3616f9d9fac23d9..7314fd724dd3daec520ba0d1fdd2974995446e8c 100644
71e593
--- a/src/sbus/request/sbus_message.c
71e593
+++ b/src/sbus/request/sbus_message.c
71e593
@@ -83,6 +83,11 @@ sbus_message_bound(TALLOC_CTX *mem_ctx, DBusMessage *msg)
71e593
         return EINVAL;
71e593
     }
71e593
 
71e593
+    if (msg == NULL) {
71e593
+        DEBUG(SSSDBG_CRIT_FAILURE, "Message can not be NULL!\n");
71e593
+        return EINVAL;
71e593
+    }
71e593
+
71e593
     /* Create a talloc context that will unreference this message when
71e593
      * the parent context is freed. */
71e593
     talloc_msg = talloc(mem_ctx, struct sbus_talloc_msg);
71e593
@@ -122,6 +127,11 @@ sbus_message_bound(TALLOC_CTX *mem_ctx, DBusMessage *msg)
71e593
 errno_t
71e593
 sbus_message_bound_ref(TALLOC_CTX *mem_ctx, DBusMessage *msg)
71e593
 {
71e593
+    if (msg == NULL) {
71e593
+        DEBUG(SSSDBG_CRIT_FAILURE, "Message can not be NULL!\n");
71e593
+        return EINVAL;
71e593
+    }
71e593
+
71e593
     dbus_message_ref(msg);
71e593
     return sbus_message_bound(mem_ctx, msg);
71e593
 }
71e593
-- 
71e593
2.14.4
71e593