[[ Bug 11214 ]] Make sure there is enough room for the NUL terminator when using textbuffer::appendtextf.
Merge branch 'bugfix-11214' into release-6.1.2