[Libreoffice-commits] core.git: unoidl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 24 15:06:08 UTC 2019


 unoidl/source/sourceprovider-parser.y |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit d397372f5cf9ff1fa67720c76768c3cc29f7de59
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 24 09:09:06 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 24 17:04:24 2019 +0200

    cid#1448548 Assignment of overlapping memory
    
    Change-Id: I146abd4635db993a5a0c5e612bb3f6dc23cdfe24
    Reviewed-on: https://gerrit.libreoffice.org/76227
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y
index 94573b1ea147..965a3b9b8c37 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -228,8 +228,11 @@ bool coerce(
             ok = true;
             break;
         case unoidl::detail::SourceProviderExpr::TYPE_FLOAT:
-            lhs->fval = lhs->uval;
-            ok = true;
+            {
+                auto nTmp = lhs->uval;
+                lhs->fval = nTmp;
+                ok = true;
+            }
             break;
         }
         break;
@@ -239,12 +242,18 @@ bool coerce(
             ok = false;
             break;
         case unoidl::detail::SourceProviderExpr::TYPE_INT:
-            rhs->fval = rhs->ival;
-            ok = true;
+            {
+                auto tmp = rhs->ival;
+                rhs->fval = tmp;
+                ok = true;
+            }
             break;
         case unoidl::detail::SourceProviderExpr::TYPE_UINT:
-            rhs->fval = rhs->uval;
-            ok = true;
+            {
+                auto tmp = rhs->uval;
+                rhs->fval = tmp;
+                ok = true;
+            }
             break;
         case unoidl::detail::SourceProviderExpr::TYPE_FLOAT:
             ok = true;


More information about the Libreoffice-commits mailing list