summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch
blob: d5602c03dbf7a4fbb33387e5597b3cfac9372132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 738a9857be9c92ad2f70be88ccee238e3154a936 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe.macdonald@windriver.com>
Date: Wed, 2 Oct 2013 14:20:37 -0400
Subject: [PATCH] racoon/pfkey: avoid potential null-pointer dereference

Building with -Werror=maybe-uninitialized revealed that 'remote' from
pk_recvmigrate() could be used with uninitialized data in
migrate_sp_ike_addresses().  Ensure it is always at a minimum assigned
NULL.

Upstream-Status: Pending

Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
---
 src/racoon/pfkey.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
index d00b166..e0dc1db 100644
--- a/src/racoon/pfkey.c
+++ b/src/racoon/pfkey.c
@@ -3352,7 +3352,7 @@ pk_recvmigrate(mhp)
 	struct sockaddr *old_saddr, *new_saddr;
 	struct sockaddr *old_daddr, *new_daddr;
 	struct sockaddr *old_local, *old_remote;
-	struct sockaddr *local, *remote;
+	struct sockaddr *local, *remote = NULL;
 	struct sadb_x_kmaddress *kmaddr;
 	struct sadb_x_policy *xpl;
 	struct sadb_x_ipsecrequest *xisr_list;
-- 
1.7.9.5

OpenPOWER on IntegriCloud