svl/source/numbers/zformat.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 734eb8b034c8035565d091aa016ce3b8df838b19
Author: Laurent Balland-Poirier <[email protected]>
Date:   Sun Aug 21 22:57:20 2016 +0200

    tdf#101636 Test index before reading OUString
    
    Change-Id: I0a4c02b172fc6d3273f6aa2cca855c27705b4d68
    Reviewed-on: https://gerrit.libreoffice.org/28282
    Reviewed-by: Eike Rathke <[email protected]>
    Tested-by: Eike Rathke <[email protected]>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 2cd9282..b4c58cc 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1411,7 +1411,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& 
rString,
                 nLen--;
                 break;
             case '$' :
-                if ( rString[nPos] == '-' )
+                if ( nPos < nLen && rString[nPos] == '-' )
                 {
                     // [$-xxx] locale
                     sBuffSymbol.stripStart('[');
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to