diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-12 12:51:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-08-19 15:15:46 +0200 |
commit | c3d7113cdfc64a2e954b9f5a1b4f39db97af5a94 (patch) | |
tree | a840681999b872c63f089b66ed2fe5492e89c465 | |
parent | f286afec5fccfee4bde8c1d7894483bf71863294 (diff) |
cid#1607270 silence Overflowed integer argument
Change-Id: I6238fe6fdf28e876c636ce12022c0458e9548578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172027
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index fa58404ab431..2d8d69c853c7 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -573,8 +573,8 @@ uno::Reference<io::XInputStream> ZipFile::checkValidPassword( if ( nSize > n_ConstDigestDecrypt ) nSize = n_ConstDigestDecrypt; - assert(nSize <= n_ConstDigestDecrypt && "silence bogus coverity overflow_sink"); - Sequence < sal_Int8 > aReadBuffer ( nSize ); + assert(nSize <= n_ConstDigestDecrypt && nSize >= 0 && "silence bogus coverity overflow_sink"); + Sequence<sal_Int8> aReadBuffer(nSize); xStream->readBytes( aReadBuffer, nSize ); |