Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: "Andrew A. Gill" <superluser@mail.isc.rit.edu>
To: AXP-list <axp-list@redhat.com>
Subject: Uh...this looks bad.
Date: Sun, 21 Jan 2001 18:51:40 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.30.0101211824220.10134-100000@res104a-017.rh.rit.edu> (raw)

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 <stdio.h>

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|
|<superluser@mail.rit.edu>            |all I got was this stupid sig! |
|alt.tv.simpsons CBG-FAQ author       |                               |
|                          (Report all obscene mail to Le Maitre Pots)|
|<http://trystero.rh.rit.edu>                         Temporary sig: --

I'm not betting.




             reply	other threads:[~2001-01-21 23:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-21 23:51 Andrew A. Gill [this message]
2001-01-22  1:01 ` Uh...this looks bad John Jasen
2001-01-22  4:52   ` multia with the 2.2.16-3 kernel jharris
2001-01-22  5:17     ` Matt Wilson
2001-01-22  2:14 ` Uh...this looks bad Matt Wilson
2001-01-24  2:17 ` Paul Jakma
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox