[Libreoffice] [PATCH] fix for i#115716 & fdo#33964
Noel Power
nopower at novell.com
Tue Feb 15 04:42:23 PST 2011
Hi Caolán
On 15/02/11 12:01, 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, and this assumes
> a NULL terminator exists and can be pushed into blob.
yeah, I think we can pretty much assume that the strings are null
terminated, the 'strings' in question are parameters to functions parsed
by basic ( where those 'functions' are effectively alias for some
arbitrary function in a dll ) so they should always be properly formed.
> e.g. str of "a" and
> insert(blob->begin(), str.getStr(), str.getStr() + str.getLength() + 1)
> will insert range [*str, *(str+2)) i.e. *str and *(str+1)
> could just shove push_back(0) in there instead.
actually this is the approach mentioned by sb in the bug
http://qa.openoffice.org/issues/show_bug.cgi?id=115716 but I added the
fix version that was actually integrated (
http://svn.services.openoffice.org/opengrok/xref/DEV300_m98/basic/source/runtime/dllmgr.cxx#210
). Happy to change that but currently I don't think its necessary to diverge
thanks,
Noel
More information about the LibreOffice
mailing list