svl/source/numbers/zforfind.hxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit ec1c30d34d9c9445ab6e22e280a9868cf910a3bc Author: Eike Rathke <[email protected]> Date: Fri Apr 5 14:41:46 2013 +0200 resolved fdo#63161 out of bounds string access Introduced with c7709b460394283fd5b1d2779b6af3585f80a991 String to OUString where previous String::GetChar() handled this. Change-Id: I9253df1af7498e2d7a8ea8077ec6b369697ad44e (cherry picked from commit d526e48912deeb44061ff570d715c31ca45f77b8) Reviewed-on: https://gerrit.libreoffice.org/3211 Reviewed-by: Michael Meeks <[email protected]> Tested-by: Michael Meeks <[email protected]> diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index 412e189..dadde5c 100644 --- a/svl/source/numbers/zforfind.hxx +++ b/svl/source/numbers/zforfind.hxx @@ -218,6 +218,10 @@ private: const OUString& rString, sal_Int32 nPos ) { + if (rWhat.isEmpty() || rString.getLength() <= nPos) + { + return false; + } // mostly used with one character if ( rWhat[ 0 ] != rString[ nPos ] ) { _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
