summaryrefslogblamecommitdiffstats
path: root/source/n/bsd-finger/bsd-finger-0.17-rfc742.patch
blob: b6dfdc7c42fca1d58f409033b97c17f4a4685e7c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                        
--- bsd-finger-0.17-pre20000412/fingerd/fingerd.c.rfc742	Sat Jul 22 14:58:58 2000
+++ bsd-finger-0.17-pre20000412/fingerd/fingerd.c	Sat Jul 22 15:01:31 2000
@@ -214,7 +214,11 @@
 	av[k++] = "finger";
 	for (s = strtok(line, WS); s && k<ENTRIES; s = strtok(NULL, WS)) {
 		/* RFC742: "/[Ww]" == "-l" */
-		if (!strncasecmp(s, "/w", 2)) memcpy(s, "-l", 2);
+		if (!strncasecmp(s, "/w", 2)) {
+		    if (k < ENTRIES - 1)
+			av[k++] = "-l";
+		    s += 2;
+		}
 		if (!forwarding) {
 		    t = strchr(s, '@');
 		    if (t) {