--- 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) {