cid#1607234 Overflowed return value

Change-Id: Ic4b47f0dd0f5d24026a4ce001d52d1fd29a0c656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177590
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara 2024-09-25 14:45:50 +01:00
parent 6fd05636e2
commit 9fa6704670

View file

@ -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<tools::Long>(mnReadBufferPos);
}