Date: Tue, 27 May 2003 17:21:22 +0300 From: Peter Pentchev <roam@ringlet.net> To: Tim Robbins <tjr@FreeBSD.ORG> Cc: audit@FreeBSD.org Subject: Re: conf/51256: chkgrp should make sure the file is newline terminated Message-ID: <20030527142122.GG513@straylight.oblivion.bg> In-Reply-To: <20030527235525.A47880@dilbert.robbins.dropbear.id.au> References: <200304220700.h3M70CM3058589@freefall.freebsd.org> <20030527084242.GB513@straylight.oblivion.bg> <20030527235525.A47880@dilbert.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
--DNUSDXU7R7AVVM8C Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2003 at 11:55:25PM +1000, Tim Robbins wrote: > On Tue, May 27, 2003 at 11:42:42AM +0300, Peter Pentchev wrote: >=20 > > Could somebody take a look at this PR and the patch (quoted below), and > > see if there's anything wrong with it or it may be committed? > [...] > > > if ((line =3D fgetln(gf, &len)) =3D=3D NULL) > > > break; > > > + if (len > 0 && line[len - 1] !=3D '\n' && line[len - 1] !=3D '\r')= { > > > + warnx("%s: line %d: no newline character", gfn, n); > > > + e++; > > > + } > [...] >=20 > I think that it's unnecessary (and incorrect) to check for a '\r' charact= er > at the end of the line. Okay, this might have been a bad habit of processing files that came =66rom Over There ;) So.. how about the patch with only the '\n' check, then? G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I am not the subject of this sentence. --DNUSDXU7R7AVVM8C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE+03Ri7Ri2jRYZRVMRAoiLAJkB+7BUw6Z7CwnGMe8sG9vkDWO09gCffvG9 f1U8iEE1tlmjI9Lz8gSSz9o= =zNIt -----END PGP SIGNATURE----- --DNUSDXU7R7AVVM8C--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030527142122.GG513>