authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-16 13:48:12-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-16 13:48:12-07:00
loga39c51c6a44fd6d8e3a5e82bcfd2db61c8972ea6
treeaaa9368bbb926d51554d3179873f2eaab8e9468a
parent47c58cba595a8e1eddf6c87086d52691d180a103

Sema: fix UAF in coerceInMemoryAllowed


1 files changed, 2 insertions(+), 2 deletions(-)

src/Sema.zig+2-2
...@@ -21246,8 +21246,8 @@ fn coerceInMemoryAllowed(...@@ -21246,8 +21246,8 @@ fn coerceInMemoryAllowed(
21246 if (child != .ok) {21246 if (child != .ok) {
21247 return InMemoryCoercionResult{ .optional_child = .{21247 return InMemoryCoercionResult{ .optional_child = .{
21248 .child = try child.dupe(sema.arena),21248 .child = try child.dupe(sema.arena),
21249 .actual = src_child_type,21249 .actual = try src_child_type.copy(sema.arena),
21250 .wanted = dest_child_type,21250 .wanted = try dest_child_type.copy(sema.arena),
21251 } };21251 } };
21252 }21252 }
2125321253