[Libreoffice] [PATCH] fix for i#115716 & fdo#33964
Michael Meeks
michael.meeks at novell.com
Tue Feb 15 06:50:30 PST 2011
On Tue, 2011-02-15 at 12:01 +0000, Caolán McNamara wrote:
> Is it guaranteed that str is NULL terminated, i.e. getStr() has always
> claimed that it might not actually be NULL terminated
Right - it is not NULL terminated.
Then again I read this:
std::vector< char > * blob = data.newBlob();
blob->insert(blob->begin(), str.getStr(), str.getStr() + str.getLength() + 1)
As passint a char * start and end iterator to the stl insert. The end
iterator is not used, we terminate the append before we hit it - at
least ... that was my assuption doing my initial double take on this.
Did you see something else in the stl docs ?
ATB,
Michael.
--
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list