mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
in new_struct_to_str, fix uaf
This commit is contained in:
committed by
Christoffer Lerno
parent
4ae3d0150f
commit
c13cdcdd36
@@ -757,8 +757,8 @@ macro String new_struct_to_str(x, Allocator allocator = allocator::heap())
|
||||
{
|
||||
s.new_init(allocator: mem);
|
||||
io::fprint(&s, x)!!;
|
||||
return s.copy_str(allocator);
|
||||
};
|
||||
return s.copy_str(allocator);
|
||||
}
|
||||
|
||||
macro String temp_struct_to_str(x) => new_struct_to_str(x, allocator::temp());
|
||||
macro String temp_struct_to_str(x) => new_struct_to_str(x, allocator::temp());
|
||||
|
||||
Reference in New Issue
Block a user