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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3211

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/3211/1

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)
---
M svl/source/numbers/zforfind.hxx
1 file changed, 4 insertions(+), 0 deletions(-)



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 @@
                                        const OUString& rString,
                                        sal_Int32 nPos )
         {
+            if (rWhat.isEmpty() || rString.getLength() <= nPos)
+            {
+                return false;
+            }
             // mostly used with one character
             if ( rWhat[ 0 ] != rString[ nPos ] )
             {

-- 
To view, visit https://gerrit.libreoffice.org/3211
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9253df1af7498e2d7a8ea8077ec6b369697ad44e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Eike Rathke <erack@redhat.com>


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.