From dd4994a4e4379454f6b58779276f1b6aa9ed6e1b Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 1 Sep 2020 18:45:35 +0200 Subject: [PATCH] std: Fix C-string with missing NUL terminator Spotted thanks to the stricter conversion rules. --- lib/std/net.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/net.zig b/lib/std/net.zig index 10e5b371f8..5a1407c35f 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -1164,7 +1164,7 @@ fn linuxLookupNameFromDnsSearch( } const search = if (rc.search.isNull() or dots >= rc.ndots or mem.endsWith(u8, name, ".")) - &[_]u8{} + "" else rc.search.span();