From f0264876dffeef28a3fc98f9612c53554df35724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xenxo=20Espasand=C3=ADn?= Date: Fri, 19 May 2023 13:02:07 +0200 Subject: [PATCH] fix(arc): assembler use after free (#125) --- src/arc/assembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arc/assembler.cpp b/src/arc/assembler.cpp index bc07f975..0ecafebf 100644 --- a/src/arc/assembler.cpp +++ b/src/arc/assembler.cpp @@ -245,8 +245,8 @@ auto assembler::assemble_function(function& func) -> void if (itr != func.labels.end()) { - func.labels.erase(old_idx); func.labels.insert({ inst->index, itr->second }); + func.labels.erase(old_idx); } }