soltools/cpp/_tokens.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a0f8df427e9363fc787f189d6a3145e01a8e698c
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Sun Oct 20 23:15:40 2019 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Oct 21 09:27:41 2019 +0200

    Avoid -fsanitize=nullptr-with-offset
    
    (new with recent Clang 10 trunk) during e.g. InstallModule_scp2/ooo:
    
    > [SPP] scp2/source/ooo/common_brand
    > soltools/cpp/_tokens.c:336:13: runtime error: applying zero offset to 
null pointer
    >  #0 in copytokenrow at soltools/cpp/_tokens.c:336:13
    >  #1 in expand at soltools/cpp/_macro.c:325:5
    >  #2 in expandrow at soltools/cpp/_macro.c:292:13
    >  #3 in process at soltools/cpp/_cpp.c:106:17
    >  #4 in main at soltools/cpp/_cpp.c:60:5
    
    Change-Id: Icbe1c105fbd0ff634f3e2966c27af1b89398be13
    Reviewed-on: https://gerrit.libreoffice.org/81187
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index c095ca6c6b9d..ff01657204db 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -333,7 +333,8 @@ Tokenrow *
 
     maketokenrow(len, dtr);
     movetokenrow(dtr, str);
-    dtr->lp += len;
+    if (len != 0)
+        dtr->lp += len;
     return dtr;
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to