diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 09:09:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-07-24 17:04:24 +0200 |
commit | d397372f5cf9ff1fa67720c76768c3cc29f7de59 (patch) | |
tree | 11e543ae203e2200a4904e8ceeb46e378e9e8dce /unoidl | |
parent | a657260c419a7138971aeb0151c81dcb23df3748 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourceprovider-parser.y | 21 |
1 files changed, 15 insertions, 6 deletions
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; |