Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!oliveb!felix!zemon From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: comp.unix.ultrix Subject: Re: 'f' dumping core Message-ID: <8546@felix.UUCP> Date: Thu, 8-Oct-87 13:30:41 EDT Article-I.D.: felix.8546 Posted: Thu Oct 8 13:30:41 1987 Date-Received: Mon, 12-Oct-87 19:25:37 EDT References: <8253@felix.UUCP> <8404@felix.UUCP> Sender: zemon@felix.UUCP Organization: Hadron, Inc., Fairfax, VA Lines: 24 Keywords: fix Approved: zemon@felix.UUCP (Art Zemon) Summary: The Fix This is a correction, if my previous note has already reached you. If you have binaries only, you must use the -m flag or trim your GECOS fields to 19 characters before the first ',' or terminating ':'. I aliased 'f' to be '/usr/ucb/finger -m' until I got fed up and went and fixed the source. In source, in routine matchcmp(), I expanded buffer[] from 20 to 64 (to accomodate some large-named users), and changed the line: while ( unfound ) { to while (unfound && i < sizeof(buffer) - 1) { Folks, when filling a buffer, I can't emphasize enough the importance of checking for end conditions like that. Your assumptions are almost always proven wrong by reality. (Well, mine are, and this program's author's were.) Joe Yao jsdy@hadron.COM (not yet domainised) hadron!jsdy@{uunet.UU.NET,dtix.ARPA,decuac.DEC.COM} att,blkcat,cos,decuac,dtix,ecogong,phw5,\ inco,insight,itc3b2,kcwc,netex,netxcom, >!hadron!jsdy empire,rlgvax,seismo,smsdpg,sundc,uunet /