From 53d54929b518e48b307611bb0e2209629a17395f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 22 Nov 2024 20:00:28 +0000 Subject: [PATCH] cid#1606852 silence Overflowed constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I94d75d6c2b69937e5d0f29b498518999b1f49120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177167 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- registry/source/reflwrit.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 854a4e0d865c..62245f6f38be 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -62,6 +62,8 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz len = maxSize / 2; } + assert(len > 0 && "maxSize has to be >= 2"); + for (i = 0; i < len; i++) { sal_uInt16 aChar;