Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.