How big is the argv[] array?
Norman Diamond
diamond at csl.sony.JUNET
Tue Oct 11 11:07:02 AEST 1988
In article <660020 at hpclscu.HP.COM>, shankar at hpclscu.HP.COM (Shankar Unni) writes:
> argv = (char **) realloc (argv, newsize * sizeof (char *))
> /* newsize is the size of your expanded argv array */
What does realloc do when its first argument is a pointer to storage
that was not obtained by malloc? Maybe you won't crash until your
program exits and the shell reads the next command line?
--
-------------------------------------------------------------------------------
The above opinions are my own. | Norman Diamond
If they're also your opinions, | Sony Computer Science Laboratory, Inc.
you're infringing my copyright. | diamond%csl.sony.jp at relay.cs.net
More information about the Comp.lang.c
mailing list