[Libreoffice-commits] core.git: soltools/cpp

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 16 20:25:25 UTC 2020


 soltools/cpp/_eval.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a435887eaf747d9b17b3620884ac2ec06d63ac00
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Apr 16 20:38:12 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Apr 16 22:24:48 2020 +0200

    cid#1462267 Infinite loop
    
    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 <caolanm at redhat.com>

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;


More information about the Libreoffice-commits mailing list