[Libreoffice-commits] .: sal/inc

Stephan Bergmann sbergmann at kemper.freedesktop.org
Wed Jul 11 06:49:30 PDT 2012


 sal/inc/rtl/ustring.hxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a23f7ddee2a2e19009f473c1e61092a85b9dc1f4
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 11 12:19:20 2012 +0200

    Revert "WaE: logically last test always passes"
    
    This reverts commit 0b1f4248338ff28208b3368b66690a84a75cc480, which appears to
    be a bogus fix (for a bogus warning?).  Also needs adaption a la
    3c598c4064cffdc2c9ff19e094594ca360779b66 "sal: work around spurious signed
    overflow warnings."
    
    Conflicts:
    
    	sal/inc/rtl/ustring.hxx
    
    Change-Id: I7e9d94fd93a37bb10604c1895ab619a8ac2c3f43

diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index f3d224e..427950f 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1314,7 +1314,9 @@ public:
     */
     OUString copy( sal_Int32 beginIndex, sal_Int32 count ) const SAL_THROW(())
     {
-        assert(beginIndex >= 0 && beginIndex <= getLength() && count >= 0);
+        assert(beginIndex >= 0 && beginIndex <= getLength() && count >= 0
+               && sal::static_int_cast< sal_uInt32 >(count) <=
+                  sal::static_int_cast< sal_uInt32 >(getLength() - beginIndex));
         if ( (beginIndex == 0) && (count == getLength()) )
             return *this;
         else


More information about the Libreoffice-commits mailing list