[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - svl/source
Eike Rathke
erack at redhat.com
Fri Apr 5 06:24:32 PDT 2013
svl/source/numbers/zforfind.hxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit ec1c30d34d9c9445ab6e22e280a9868cf910a3bc
Author: Eike Rathke <erack at redhat.com>
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 <michael.meeks at suse.com>
Tested-by: Michael Meeks <michael.meeks at suse.com>
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 ] )
{
More information about the Libreoffice-commits
mailing list