From 9fa670467033bc0ef99539295f8f2425e05a51e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 25 Sep 2024 14:45:50 +0100 Subject: [PATCH] cid#1607234 Overflowed return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic4b47f0dd0f5d24026a4ce001d52d1fd29a0c656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177590 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- writerperfect/source/common/WPXSvInputStream.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx index 1f68b6810f76..0767e94d263e 100644 --- a/writerperfect/source/common/WPXSvInputStream.cxx +++ b/writerperfect/source/common/WPXSvInputStream.cxx @@ -739,7 +739,10 @@ WPXSvInputStream::~WPXSvInputStream() {} long WPXSvInputStream::tell() { + // coverity[tainted_data_return : FALSE] retVal is considered safe now tools::Long retVal = tellImpl(); + if (retVal < 0) + return -1; return retVal + static_cast(mnReadBufferPos); }