From f2927977b4895f05e727ee9d01cc31877cb4ef6a Mon Sep 17 00:00:00 2001 From: Evan Haas Date: Mon, 27 Nov 2023 14:34:09 -0800 Subject: [PATCH] Compilation: check for embedded null bytes in path for has_include --- src/aro/Compilation.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/aro/Compilation.zig b/src/aro/Compilation.zig index a5bc6458..38020067 100644 --- a/src/aro/Compilation.zig +++ b/src/aro/Compilation.zig @@ -1349,6 +1349,10 @@ pub fn hasInclude( /// __has_include vs __has_include_next which: WhichInclude, ) !bool { + if (mem.indexOfScalar(u8, filename, 0) != null) { + return false; + } + const cwd = std.fs.cwd(); if (std.fs.path.isAbsolute(filename)) { if (which == .next) return false;