From 2af9fcddba57632e4a13797dcd5894f4cfeb51a7 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Tue, 26 Nov 2024 18:29:44 +1030 Subject: [PATCH] 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 --- xmlsecurity/source/helper/documentsignaturehelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx index e3908fc5ee76..ca4446bdf740 100644 --- a/xmlsecurity/source/helper/documentsignaturehelper.cxx +++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx @@ -371,7 +371,7 @@ SignatureStreamHelper DocumentSignatureHelper::OpenSignatureStream( sal_Int64 nSize = 0; uno::Reference 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 aData; xInputStream->readBytes(aData, nSize);