When I try to compile the following code, I get an additional message from the buffer.
The code that we use has,
buf = '\0';
vsprintf(buf, fmt, va);
len = fprintf(work,"%s",buf);
The buffer should only contain the content of fmt. But, it also contains the text "parent information" along with the content of fmt. i.e, if the value of fmt is "hi", the value of buf should also be "hi". But the actual value that we get is, "parent informationhi".