summaryrefslogtreecommitdiff
path: root/hwpfilter/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-10 15:02:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-11 00:10:51 +0000
commitd6b590feda1c61fd5ed14c0be66379b8e5de0c6a (patch)
tree6a074714c0683576c432fdee766d6cbf43188308 /hwpfilter/source
parent9788a565b3241d1bd62394b9e29c322361d05f80 (diff)
ofz: Use-of-uninitialized-value
Change-Id: I033fab3ea016d3b57891a35602920b7de811ccb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter/source')
-rw-r--r--hwpfilter/source/hbox.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index 3b740999b560..47d18e76fc1e 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -579,10 +579,11 @@ OUString Outline::GetUnicode() const
case OLSTY_NUMS2:
{
OStringBuffer buf;
- int i;
-
- for (i = 0; i <= level; i++)
+ for (unsigned int i = 0; i <= level; ++i)
{
+ if (i >= std::size(number))
+ break;
+
levelnum = ((number[i] < 1) ? 1 : number[i]);
buf.append(OString::number(levelnum));
if (!(shape == OLSTY_NUMS2 && i && i == level))