diff options
author | Eike Rathke <erack@redhat.com> | 2013-04-05 14:41:46 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-04-05 14:52:45 +0200 |
commit | d526e48912deeb44061ff570d715c31ca45f77b8 (patch) | |
tree | 1b398e876d4a19a52989d2ea79299b0f217bb8c6 | |
parent | babbd149aa9b2b5a28c55cb38fbbe24586bf8e22 (diff) |
resolved fdo#63161 out of bounds string access
Introduced with c7709b460394283fd5b1d2779b6af3585f80a991
String to OUString where previous String::GetChar() handled this.
Change-Id: I9253df1af7498e2d7a8ea8077ec6b369697ad44e
-rw-r--r-- | svl/source/numbers/zforfind.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx index 412e189f5028..dadde5cc1a46 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 ] ) { |