Fix missing NUL terminators in xmlBuf and xmlBuffer functions
- buf.c: (xmlBufAddLen):
- Change check for remaining space to account for the NUL terminator. When adding a length exactly equal to the number of unused bytes, a NUL terminator was not written. (xmlBufResize):
- Set
buf->use
and NUL terminator when allocating a new buffer.
- tree.c: (xmlBufferResize):
- Set
buf->use
and NUL terminator when allocating a new buffer. (xmlBufferAddHead): - Set NUL terminator before returning early when shifting contents.
Edited by David Kilzer