Re: [xml] Possible bug with xmlBufferPtr object?

On Sat, Jan 31, 2009 at 08:14:15AM +0100, Daniel Veillard wrote:
On Thu, Jan 29, 2009 at 06:25:58PM -0500, Gilles Roy wrote:
Or does the application have to add the string terminator itself?

  The terminator may not be present in a buffer and it's definitely
not accounted for in the size, like in any classic C API, I can't see
why you're expecting this.

Thanks. The reason I was unsure is because the sample code from the
website treats the buffer as terminated:

609:    fprintf(fp, "%s", (const char *) buf->content);

So this code could end up writting garbage. I've created a bug report:
Bug 570214 â Sample code from website has a bug


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]