From owner-cvs-usrbin Thu Dec 28 02:46:35 1995 Return-Path: owner-cvs-usrbin Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA27302 for cvs-usrbin-outgoing; Thu, 28 Dec 1995 02:46:35 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA27291 Thu, 28 Dec 1995 02:46:17 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id VAA26015; Thu, 28 Dec 1995 21:43:05 +1100 Date: Thu, 28 Dec 1995 21:43:05 +1100 From: Bruce Evans Message-Id: <199512281043.VAA26015@godzilla.zeta.org.au> To: bde@zeta.org.au, peter@jhome.DIALix.COM Subject: Re: cvs commit: src/usr.bin/tftp main.c Cc: CVS-committers@freefall.freebsd.org, cvs-usrbin@freefall.freebsd.org, joerg@freefall.freebsd.org Sender: owner-cvs-usrbin@FreeBSD.ORG Precedence: bulk >Perhaps the safest "fix" may be to shove a simple replacement for gets() >into libc or libutil with a similar interface that we can use to take >care of this sort of thing. We can edit our sources to change > gets(line); >to > __ngets(line, sizeof(line)); I think the replacement should be something like int fgets_DWIM(same args as fgets); which reads to the next newline (if any) and discards the newline and discards any data that doesn't fit. Bruce