Blame SOURCES/0104-tipc-bearer-Prevent-NULL-pointer-dereference.patch

36cfb7
From 73b2d3ee4bbdbfba7db035d9b89a2bcffc15e1ba Mon Sep 17 00:00:00 2001
36cfb7
From: Andrea Claudi <aclaudi@redhat.com>
36cfb7
Date: Mon, 29 Apr 2019 20:08:08 +0200
36cfb7
Subject: [PATCH] tipc/bearer: Prevent NULL pointer dereference
36cfb7
36cfb7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
36cfb7
Upstream Status: iproute2.git commit 70a6df3962b84
36cfb7
36cfb7
commit 70a6df3962b8448fc9c28d72606828a004ed5b6b
36cfb7
Author: Phil Sutter <phil@nwl.cc>
36cfb7
Date:   Thu Aug 24 11:46:34 2017 +0200
36cfb7
36cfb7
    tipc/bearer: Prevent NULL pointer dereference
36cfb7
36cfb7
    Signed-off-by: Phil Sutter <phil@nwl.cc>
36cfb7
---
36cfb7
 tipc/bearer.c | 2 +-
36cfb7
 1 file changed, 1 insertion(+), 1 deletion(-)
36cfb7
36cfb7
diff --git a/tipc/bearer.c b/tipc/bearer.c
36cfb7
index c3d4491f8f6ef..0d84570150624 100644
36cfb7
--- a/tipc/bearer.c
36cfb7
+++ b/tipc/bearer.c
36cfb7
@@ -439,7 +439,7 @@ static int cmd_bearer_enable(struct nlmsghdr *nlh, const struct cmd *cmd,
36cfb7
 		return err;
36cfb7
 
36cfb7
 	opt = get_opt(opts, "media");
36cfb7
-	if (strcmp(opt->val, "udp") == 0) {
36cfb7
+	if (opt && strcmp(opt->val, "udp") == 0) {
36cfb7
 		err = nl_add_udp_enable_opts(nlh, opts, cmdl);
36cfb7
 		if (err)
36cfb7
 			return err;
36cfb7
-- 
36cfb7
2.20.1
36cfb7