Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!texbell!sugar!ficc!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond From: diamond@csl.sony.JUNET (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: How big is the argv[] array? Message-ID: <10033@socslgw.csl.sony.JUNET> Date: 11 Oct 88 01:07:02 GMT References: <1239500004@osiris.cso.uiuc.edu> <660020@hpclscu.HP.COM> Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 12 In article <660020@hpclscu.HP.COM>, shankar@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@relay.cs.net