From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id A626C2F37A for ; Sun, 21 Jan 2001 18:51:52 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f0LNpYU29126 for axp-list@listman.redhat.com; Sun, 21 Jan 2001 18:51:34 -0500 Received: from filer2.rit.edu (filer2.isc.rit.edu [129.21.2.226]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f0LNpXd29121 for ; Sun, 21 Jan 2001 18:51:33 -0500 Received: from res104a-017.rh.rit.edu ("port 3060"@[129.21.104.17]) by osfmail.rit.edu (PMDF V6.0-24 #41785) with ESMTP id <0G7J00B55EA4KD@osfmail.rit.edu> for axp-list@redhat.com; Sun, 21 Jan 2001 18:51:40 -0500 (EST) Date: Sun, 21 Jan 2001 18:51:40 -0500 (EST) From: "Andrew A. Gill" Subject: Uh...this looks bad. X-Sender: To: AXP-list Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors Now, I'm new to incorporating command-line arguments into my programs, but this looks bad. With the updated GCC (gcc-2.96-69), when I try the following simple program: /* --- */ #include void main(int argc, char *argv[]) { int i; for(i = 1; i < 20 ; i++) printf("%s\n",argv[i]); } /* --- */ I get the following output: --- This has been edited, but it looks like the info is correct. --- (null) PWD= HOSTNAME= QTDIR= LESSOPEN= KDEDIR= USER= LS_COLORS= MACHTYPE= MAIL= INPUTRC= BASH_ENV= LOGNAME= SHLVL= SHELL= USERNAME= HOSTTYPE= OSTYPE= HISTSIZE= --- It seems like this might provide too much information to a possibly malicious user. So am I just dumb, and are these trivial environmental variables (it also lists HOME=, TERM=, and PATH= before segfaulting), or is this kind of bad? -- |Andrew A. Gill |I posted to Silent-Tristero and| | |all I got was this stupid sig! | |alt.tv.simpsons CBG-FAQ author | | | (Report all obscene mail to Le Maitre Pots)| | Temporary sig: -- I'm not betting.