Blame SOURCES/bsd-finger-0.17-match_sigsegv.patch

d77ab8
diff -up bsd-finger-0.17/finger/util.c.match_sigsegv bsd-finger-0.17/finger/util.c
d77ab8
--- bsd-finger-0.17/finger/util.c.match_sigsegv	2012-10-16 10:22:26.240480338 +0200
d77ab8
+++ bsd-finger-0.17/finger/util.c	2012-10-16 10:26:15.744072682 +0200
d77ab8
@@ -186,6 +186,9 @@ match(struct passwd *pw, const char *use
d77ab8
 	int i, j, ct, rv=0;
d77ab8
 	char *rname;
d77ab8
 
d77ab8
+	if (pw == NULL || pw->pw_gecos == NULL)
d77ab8
+		return 0;
d77ab8
+
d77ab8
 	strncpy(tbuf, pw->pw_gecos, TBUFLEN);
d77ab8
 	tbuf[TBUFLEN-1] = 0;  /* guarantee null termination */
d77ab8
 	p = tbuf;