commit 82661f07033c91bda1892cb59313396a40f86dfc
parent 61e879b522a5017005d53d4bf2409d1c41cd6dc1
Author: Eyal Sawady <ecs@d2evs.net>
Date: Wed, 11 May 2022 13:19:46 +0000
hare::module::scan_directory: fix double free
Caused a segfault on `hare test -lc` in the stdlib
Signed-off-by: Eyal Sawady <ecs@d2evs.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hare/module/scan.ha b/hare/module/scan.ha
@@ -257,7 +257,7 @@ fn scan_directory(
};
let path = path::join(path, name);
- let tuple = (false, base, tags, path);
+ let tuple = (false, strings::dup(base), tags, path);
let superceded = false;
for (let j = 0z; j < len(inputs); j += 1) {
if (inputs[j].1 != base) {