Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site topaz.RUTGERS.EDU
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!columbia!topaz!hedrick
From: hedrick@topaz.RUTGERS.EDU (Charles Hedrick)
Newsgroups: net.bugs.4bsd
Subject: bug in fing.c
Message-ID: <3691@topaz.RUTGERS.EDU>
Date: Wed, 18-Sep-85 19:43:48 EDT
Article-I.D.: topaz.3691
Posted: Wed Sep 18 19:43:48 1985
Date-Received: Fri, 20-Sep-85 06:04:39 EDT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 17

We have found a portability problem in fing.c, which is a "front end"
to finger that knows about network connections.  I would normally
report it directly to the author, cak, but I have been unable to
figure out which of the 50 *.purdue.edu machines to use.  Anyway, in
fing.c, look for the first occurence of strcat.  You will find a call
of the form

	write (fd, strcat(user, "\r\n"), strlen(user) + 2);

This code seems to assume that arguments are evaluated right to
left.  I believe that in C, evaluation order is undefined.  At
any rate, it causes obscure symptoms on a Pyramid.  I suggest

	strcat(user, "\r\n");
	write (fd, user, strlen(user));

which works fine on the Pyramid, and would seem to be portable.