"Jarmo Paavilainen" <netletter(at)comder(dot)com> writes:
> Well thats the point. Why do I need to allocate one extra space for the
> string (the first one allready allocate space for the NULL). While the
> second example allocates one char too much.
The given fragment of code clearly isn't overwriting anything it
shouldn't. I think that enlarging the allocated space is masking a bug
somewhere else.
regards, tom lane