sal/osl/unx/security.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit f0f0d385b91df30d4ec42a9f727cbdbe5ce0861f
Author: Caolán McNamara <[email protected]>
AuthorDate: Wed Sep 7 17:08:38 2022 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Sep 13 09:56:12 2022 +0200
cid#1509232 silence Out-of-bounds access
Change-Id: I53f0e0ead728c718d1241d1791135c3c60311303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139608
Reviewed-by: Stephan Bergmann <[email protected]>
Tested-by: Jenkins
diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx
index 1b1f16a54edc..b15ec9e773b0 100644
--- a/sal/osl/unx/security.cxx
+++ b/sal/osl/unx/security.cxx
@@ -106,6 +106,8 @@ static oslSecurityImpl * growSecurityImpl(
}
p = static_cast<oslSecurityImpl *>(realloc(impl, n));
if (p != nullptr) {
+ // coverity[overrun-buffer-arg] - theoretically massive n is not
due to
+ // a negative parameter being interpreted as unsigned
memset (p, 0, n);
}
}