commit e006281d79a31e10bdbc07b3e33427d719ec01df (tree)
parent 1f29b75f082660bf8393da5c41cd4ca855f5db88
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
@@ -2511,7 +2511,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{