mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
Sema: fix UAF in coerceInMemoryAllowed
This commit is contained in:
parent
47c58cba59
commit
a39c51c6a4
@ -21246,8 +21246,8 @@ fn coerceInMemoryAllowed(
|
||||
if (child != .ok) {
|
||||
return InMemoryCoercionResult{ .optional_child = .{
|
||||
.child = try child.dupe(sema.arena),
|
||||
.actual = src_child_type,
|
||||
.wanted = dest_child_type,
|
||||
.actual = try src_child_type.copy(sema.arena),
|
||||
.wanted = try dest_child_type.copy(sema.arena),
|
||||
} };
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user