Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Uh...this looks bad.
@ 2001-01-21 23:51 Andrew A. Gill
  2001-01-22  1:01 ` John Jasen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew A. Gill @ 2001-01-21 23:51 UTC (permalink / raw)
  To: AXP-list

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.




^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <Pine.LNX.4.10.10101212047460.758-100000@softwareag.com>]

end of thread, other threads:[~2001-01-24  2:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-21 23:51 Uh...this looks bad Andrew A. Gill
2001-01-22  1:01 ` 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
     [not found] <Pine.LNX.4.10.10101212047460.758-100000@softwareag.com>
2001-01-22  9:54 ` multia with the 2.2.16-3 kernel Joerg Bruehe

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