diff options
author | John Hodge <tpg@ucc.asn.au> | 2018-11-04 08:22:18 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-11-04 08:24:03 +0800 |
commit | a51eea542ae086687ea2c4cb09321785f5cc6269 (patch) | |
tree | e3509a24f8f4cb3b57fdae2508997b896038369d | |
parent | bd32801622229ba3ac02924852f2835bed9debc3 (diff) | |
download | mrust-a51eea542ae086687ea2c4cb09321785f5cc6269.tar.gz |
Typecheck Expressions - Fix a use-after-free, impacts #85
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index b62ea1cc..554fea69 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -5204,7 +5204,7 @@ namespace { DEBUG("- Magic inferrence link for binops on numerics"); context.equate_types(sp, res, left); } - context.equate_types_to_shadow(sp, right); + context.equate_types_to_shadow(sp, /*right*/v.params.m_types.at(0)); // RHS, can't use `right` because it might be freed by the above equate. } else { |