From a435887eaf747d9b17b3620884ac2ec06d63ac00 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 16 Apr 2020 20:38:12 +0100 Subject: cid#1462267 Infinite loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since... commit a2362e0ff5a7cec16e888502a3c16fe2fa7ba0fe Date: Wed Apr 15 19:32:09 2020 +0200 loplugin:buriedassign in sfx2..sot Change-Id: Iabbef1b027cb6bd77b387142df926c5b37858517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92392 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- soltools/cpp/_eval.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'soltools') diff --git a/soltools/cpp/_eval.c b/soltools/cpp/_eval.c index e8b679ea93e1..dba04abf4649 100644 --- a/soltools/cpp/_eval.c +++ b/soltools/cpp/_eval.c @@ -726,9 +726,11 @@ struct value if (*p == 'x') { p += 1; - i = digit(*p); - while (i >= 0 && i <= 15) + while (1) { + i = digit(*p); + if (i < 0 || i > 16) + break; p += 1; n <<= 4; n += i; -- cgit