Date: Mon, 2 Dec 2002 13:37:52 +0100 From: Thomas Quinot <thomas@FreeBSD.ORG> To: Peter Pentchev <roam@ringlet.net> Cc: hackers@FreeBSD.org, audit@FreeBSD.org Subject: Re: [CFR] diskpart(1) buffer overflow fix Message-ID: <20021202123752.GA62114@melusine.cuivre.fr.eu.org> In-Reply-To: <20021202122150.GE372@straylight.oblivion.bg> References: <20021202115809.GD372@straylight.oblivion.bg> <20021202122150.GE372@straylight.oblivion.bg>
next in thread | previous in thread | raw e-mail | index | archive | help
Le 2002-12-02, Peter Pentchev écrivait :
> > Attached are two patches: a trivial one which just fixes up two problems
> > in diskpart's argument parsing, and a more complex one, which does it
> > "the right way" IMHO, using getopt(3).
The getopt-based version sounds better to me.
> +			case 'd':
> +				dflag++;
> +				if (pflag)
> +					usage();
> +				break;
> +				
> +			case 'p':
> +				if (dflag)
> +					usage();
> +				pflag++;
> +				break;
I'd remove both tests and replace them with a single
  if (pflag && dflag) usage()
after all arguments have been processed.
Thomas.
-- 
    Thomas.Quinot@Cuivre.FR.EU.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?20021202123752.GA62114>
