Crash with gnome#627420-1.ods in string related function
Michael Meeks
michael.meeks at suse.com
Tue Jan 8 06:26:09 PST 2013
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 at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list