unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob ba977c95bf086a6f2d50de817488dcff8b9e87d8 741 bytes (raw)
name: gnu/packages/patches/bsd-games-null-check.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c
index 11f4c44..28321bc 100644
--- a/hunt/hunt/hunt.c
+++ b/hunt/hunt/hunt.c
@@ -394,7 +394,8 @@ broadcast_vec(s, vector)

	vec_cnt = 0;
	for (ip = ifp; ip; ip = ip->ifa_next)
-		if ((ip->ifa_addr->sa_family == AF_INET) &&
+		if (ip->ifa_addr &&
+		    (ip->ifa_addr->sa_family == AF_INET) &&
		    (ip->ifa_flags & IFF_BROADCAST))
			vec_cnt++;

@@ -405,7 +406,8 @@ broadcast_vec(s, vector)

	vec_cnt = 0;
	for (ip = ifp; ip; ip = ip->ifa_next)
-		if ((ip->ifa_addr->sa_family == AF_INET) &&
+		if (ip->ifa_addr &&
+		    (ip->ifa_addr->sa_family == AF_INET) &&
		    (ip->ifa_flags & IFF_BROADCAST))
			memcpy(&(*vector)[vec_cnt++], ip->ifa_broadaddr,
			       sizeof(struct sockaddr_in));

debug log:

solving ba977c95bf ...
found ba977c95bf in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).