Re: realloc(): invalid next size



solanki.chandrakant@xxxxxxxxx said:

hi

i have fedora linux 4 and i have simple realloc program which i am
included here... plz help me to overcome the realloc to pointer to
character variable.

Please take the time to write readable English, with proper case
distinctions and spellings and so on. It is so much easier to read. Thank
you.

The answer to your problem is that you have forgotten to null-terminate the
string in your strcats() function.

There are several other minor problems which I will go into if you wish, but
at present you are likely to see them as a pointless distraction. But I
will just say this: given your willingness to hurl string literals at
strcats(), I recommend that you make its parameter const char *.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.