Blame SOURCES/0249-coverity-fix-def7.patch

4b6aa8
From 11878b5cc127126c8671199d9dae580149703439 Mon Sep 17 00:00:00 2001
4b6aa8
From: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
Date: Wed, 18 Jul 2018 15:10:17 +0000
4b6aa8
Subject: [PATCH] coverity fix [#def7]
4b6aa8
4b6aa8
libreport-2.9.5/src/gui-wizard-gtk/wizard.c:1028: dereference: Dereferencing a
4b6aa8
null pointer "event_name_end".
4b6aa8
4b6aa8
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def7
4b6aa8
4b6aa8
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
4b6aa8
4b6aa8
(cherry picked from commit 6ef9f702af8df7acc69887656752a24cfd5a64c8)
4b6aa8
---
4b6aa8
 src/gui-wizard-gtk/wizard.c | 3 +++
4b6aa8
 1 file changed, 3 insertions(+)
4b6aa8
4b6aa8
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
4b6aa8
index b4b2c3d..eb0dee7 100644
4b6aa8
--- a/src/gui-wizard-gtk/wizard.c
4b6aa8
+++ b/src/gui-wizard-gtk/wizard.c
4b6aa8
@@ -1079,6 +1079,9 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
4b6aa8
             break;
4b6aa8
 
4b6aa8
         char *event_name_end = strchr(event_name, '\n');
4b6aa8
+        if (event_name_end == NULL)
4b6aa8
+            break;
4b6aa8
+
4b6aa8
         *event_name_end = '\0';
4b6aa8
 
4b6aa8
         event_config_t *cfg = get_event_config(event_name);
4b6aa8
-- 
4b6aa8
2.21.0
4b6aa8