1 From 05a2677920f0240ea302e67d699546665687dd14 Mon Sep 17 00:00:00 2001
2 From: Robbie Harwood <rharwood@redhat.com>
3 Date: Tue, 13 Jun 2017 14:22:44 -0400
4 Subject: [PATCH] Tolerate NULL pointers in gp_same
6 Fixes potential NULL derefs of program names
8 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
9 Reviewed-by: Simo Sorce <simo@redhat.com>
11 (cherry picked from commit afe4c2fe6f7f939df914959dda11131bd80ccec6)
13 proxy/src/gp_util.c | 3 +--
14 1 file changed, 1 insertion(+), 2 deletions(-)
16 diff --git a/proxy/src/gp_util.c b/proxy/src/gp_util.c
17 index f158b84..5442992 100644
18 --- a/proxy/src/gp_util.c
19 +++ b/proxy/src/gp_util.c
22 bool gp_same(const char *a, const char *b)
24 - if ((a == b) || strcmp(a, b) == 0) {
25 + if (a == b || (a && b && strcmp(a, b) == 0)) {