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

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