[Libreoffice] [PATCH] fix for i#115716 & fdo#33964

Noel Power nopower at novell.com
Tue Feb 15 12:56:11 PST 2011

Hi Caolan
On 15/02/11 16:17, Noel Power wrote:
> On 15/02/11 15:28, Michael Meeks wrote:
>>     Which it doesn't, so good catch; Noel we should fix that :-)
> well as it turns out it does, rtl_string_ImplAlloc always creates a 
> buffer 1 bigger than the requested len and stuffs a '\0' in it. 
> Strange but true. Still this was fun ( in a torturous way ) and 
> luckily I haven't had a heart attack yet. In short I think it will work
needless to say I did in fact assume that OUString/OString(s) were 
ordinarily inherently null terminated and I thought your orig question 
was asking whether it was  possible we send in any 'funny' strings ( ala 
bags of bytes in a string container etc. ) into the dllmgr. My answer 
was was based on the fact that all strings we pass in are in fact 
'proper' strings parsed out of the source code. Of course it looks like 
I answered the wrong question and was wrong again because these things 
are in fact not (really) null terminated ( despite the years of printing 
these out telling me otherwise ). I wasn't intentionally trying to 
mislead you, sorry 'bout that. Of course in the end it seems that 
'rtl_string_ImplAlloc' explains why printing always works and why the 
patch shouldn't be a problem



More information about the LibreOffice mailing list