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

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