summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-13 19:57:31 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-07-14 15:14:09 +0200
commit884dd38e57c6c655f0ecf3014a86e06fce366e83 (patch)
tree9bf9a011ca3afce535b77bacc3b1edb8dbb8439f /desktop/source
parentb904816f7375ef63c6c86578bed58f8dc06b6125 (diff)
cid#1608572 silence Overflowed integer argument
try to convince coverity of the errors of its ways Change-Id: I4e847f3773931dccaff1724166072bfde0b97941 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170438 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index e8f9cf607b9d..e3789008306f 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -588,6 +588,8 @@ OUString replaceOrigin(
index = nBytes;
}
+ assert(index >= 0);
+
if ((write_pos + index) > filtered.size())
filtered.resize( (filtered.size() + index) * 2 );
memcpy( filtered.data() + write_pos, pBytes, index );