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



On Tue, 2013-01-08 at 05:19 -0800, julien2412 wrote:
Hello Michael,

Reading this thread, I took a look at sal/rtl/source/strtmpl.cxx
    969 static IMPL_RTL_STRINGDATA* IMPL_RTL_STRINGNAME( ImplAlloc )(
sal_Int32 nLen )
...
Since we cast "nLen" parameter in "sal_uInt32", could it help to add an
assert about nLen should be >= 0 ?

        Sounds great to me :-) lots of code paths to there check for a positive
length I guess some mass code clean to use sal_uInt32 instead of
sal_Int32 for string lengths might be in order at some stage - though
perhaps there is some reason that's not obvious to me for strings to
have a signed length and to check for it to be > 0 around the place:
perhaps for some insertion/offset API semantic corner-case reason ?

        Thanks !

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


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.