[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sal/rtl

Stephan Bergmann sbergman at redhat.com
Thu Oct 10 04:35:47 PDT 2013


 sal/rtl/strtmpl.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f81ed484ffd443e2593627f3d8d3133161817af2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 9 19:10:32 2013 +0200

    Fail fast at least in debug builds
    
    Change-Id: I266d5cf5b98827617f7ed65c94a772e28808f386
    (cherry picked from commit 57a28dc9556b4e6fff337e0eb9d0d8abc5223161)
    Reviewed-on: https://gerrit.libreoffice.org/6186
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index dd1effc..47bbc9b 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -1258,7 +1258,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromSubString )( IMPL_RTL_STRINGDATA** ppT
     }
     if ( count < 0 || beginIndex < 0 || beginIndex + count > pFrom->length )
     {
-        OSL_FAIL( "Out of bounds substring access" );
+        assert(false); // fail fast at least in debug builds
         IMPL_RTL_STRINGNAME( newFromLiteral )( ppThis, "!!br0ken!!", 10, 0 );
         return;
     }


More information about the Libreoffice-commits mailing list