From owner-freebsd-bugs Thu Jan 10 0:20:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F3FB437B41C for ; Thu, 10 Jan 2002 00:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0A8K2t34335; Thu, 10 Jan 2002 00:20:02 -0800 (PST) (envelope-from gnats) Date: Thu, 10 Jan 2002 00:20:02 -0800 (PST) Message-Id: <200201100820.g0A8K2t34335@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Marc Olzheim Subject: Re: kern/33738: [PATCH] empty argv Reply-To: Marc Olzheim Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/33738; it has been noted by GNATS. From: Marc Olzheim To: Garrett Wollman Cc: Marc Olzheim , freebsd-gnats-submit@FreeBSD.ORG, Serge van den Boom Subject: Re: kern/33738: [PATCH] empty argv Date: Thu, 10 Jan 2002 09:16:36 +0100 [snip] > If the Standard does not say that a list must be non-empty, then it > may be empty. Hmmm, then programs like passwd, lpr, etc. should probably be fixed, or checked for potential abuse of (argc == 0). Marc __ /* noargv.c */ #include #include int main(int argc, char *argv[]) { const char *bar[] = { "/tmp/foo", NULL }; if (argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]); return(1); } execve(argv[1], NULL, bar); perror("execve"); return(0); } __ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message