commit 96b77e030fa659539adf0fb421c01451c8980b35 (tree)
parent cf6e2d318a6e4b2d8921c3fd1989c693874ab942
Author: Michael Dusan <michael.dusan@gmail.com>
Date: Thu, 17 Jun 2021 23:57:24 -0400
macho: LC_RPATH: reserve byte for null-terminator
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/link/MachO/Zld.zig b/src/link/MachO/Zld.zig
@@ -2171,7 +2171,7 @@ fn addRpaths(self: *Zld, rpaths: []const []const u8) !void {
for (rpaths) |rpath| {
const cmdsize = @intCast(u32, mem.alignForwardGeneric(
u64,
- @sizeOf(macho.rpath_command) + rpath.len,
+ @sizeOf(macho.rpath_command) + rpath.len + 1,
@sizeOf(u64),
));
var rpath_cmd = emptyGenericCommandWithData(macho.rpath_command{