Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2001 08:24:20 -0600
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Mike Heffner <mheffner@vt.edu>
Cc:        FreeBSD-audit <FreeBSD-audit@FreeBSD.ORG>, Nathan Ahlstrom <nrahlstr@winternet.com>
Subject:   Re: mail(1) cleanup patch
Message-ID:  <20010216082420.A85640@hamlet.nectar.com>
In-Reply-To: <XFMail.20010215234419.mheffner@vt.edu>; from mheffner@vt.edu on Thu, Feb 15, 2001 at 11:44:19PM -0500
References:  <20010215214346.A28110@spawn.nectar.com> <XFMail.20010215234419.mheffner@vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 15, 2001 at 11:44:19PM -0500, Mike Heffner wrote:
> 
> On 16-Feb-2001 Jacques A. Vidrine wrote:
> | Well, actually, it _is_ a macro -- which expands to an inline.  But at
> ...
> 
> Alright, I redid the patch. I also axed copy() as it was just a hidden
> strcpy(), and was only used in one place.
> 
> http://filebox.vt.edu/users/mheffner/patches/mail.patch

This looks good.  There are always more nits :-)  but mostly they were
there before you arrived.  Nothing earth-shattering, I think, but hey,
``while you are there'':

Purely -audit fodder:
 = Are you certain that in each case where you've used 
   snprintf/strlcpy, that truncation is harmless?  Perhaps better
   to check.  Stuff like `cp += strlcpy(...)' is particularly
   suspect.
 = Paranoia about strcpy->strlcpy is good, but then there are some 
   calls that could be converted from strcat->strlcat.

Stuff I couldn't keep to myself (I tried):
 = anyof() can be tossed, and strpbrk() used directly.
 = There's some inconsistent usage of err vs errx.
 = NOSTR, NIL, NONE, NOVAR, NOGRP, NOGE are misspellings of NULL.
 = creat is the ancient way of spelling open(..., O_CREAT|O_TRUNC|O_WRONLY,
   ...);
 
Thanks for the hard work!
Cheers,
-- 
Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010216082420.A85640>