[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jul 20 18:25:36 UTC 2019


 sw/source/core/unocore/unofield.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1b54c782e6a29ad1dde990cd80f33da068fb52d8
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jul 20 15:34:42 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Jul 20 20:24:32 2019 +0200

    cid#1448255 Out-of-bounds access
    
    Change-Id: I78eaaaea59162a7fc66e3cc0989a38acb8024eb3
    Reviewed-on: https://gerrit.libreoffice.org/76018
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 007c114339ac..3afe7a95ca88 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -405,9 +405,9 @@ static sal_uInt16 lcl_GetPropertyMapOfService( SwServiceType nServiceId )
     case SwServiceType::FieldMasterDummy5: nRet = PROPERTY_MAP_FLDMSTR_DUMMY0; break;
     case SwServiceType::FieldTypeHiddenText: nRet = PROPERTY_MAP_FLDTYP_HIDDEN_TEXT; break;
     default:
-        OSL_FAIL( "wrong service id" );
         nRet = USHRT_MAX;
     }
+    assert(nRet != USHRT_MAX && "wrong service id");
     return nRet;
 }
 


More information about the Libreoffice-commits mailing list