xmlsecurity/source/helper/documentsignaturehelper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 68391d1dcd1410e64845df58aacfe03cb0ae76a3
Author:     Aron Budea <aron.bu...@collabora.com>
AuthorDate: Tue Nov 26 18:29:44 2024 +1030
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Nov 26 19:26:41 2024 +0100

    Operator should be logical AND instead of OR
    
    Change-Id: Ife1870da9979e974fa9dc11ca7dff87c8cfe66bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177310
    Tested-by: Jenkins
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>
    (cherry picked from commit 2af9fcddba57632e4a13797dcd5894f4cfeb51a7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177356
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx 
b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index b35c709915f4..bdbaa5a0fd64 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -377,7 +377,7 @@ SignatureStreamHelper 
DocumentSignatureHelper::OpenSignatureStream(
                     sal_Int64 nSize = 0;
                     uno::Reference<beans::XPropertySet> 
xPropertySet(xInputStream, uno::UNO_QUERY);
                     xPropertySet->getPropertyValue(u"Size"_ustr) >>= nSize;
-                    if (nSize >= 0 || nSize < SAL_MAX_INT32)
+                    if (nSize >= 0 && nSize < SAL_MAX_INT32)
                     {
                         uno::Sequence<sal_Int8> aData;
                         xInputStream->readBytes(aData, nSize);

Reply via email to