authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2021-06-17 23:57:24-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-06-20 16:36:27-07:00
log96b77e030fa659539adf0fb421c01451c8980b35
treec7d0ade0d571416b9abbc24cadd64abb4541a2e1
parentcf6e2d318a6e4b2d8921c3fd1989c693874ab942

macho: LC_RPATH: reserve byte for null-terminator


1 files changed, 1 insertions(+), 1 deletions(-)

src/link/MachO/Zld.zig+1-1
...@@ -2171,7 +2171,7 @@ fn addRpaths(self: *Zld, rpaths: []const []const u8) !void {...@@ -2171,7 +2171,7 @@ fn addRpaths(self: *Zld, rpaths: []const []const u8) !void {
2171 for (rpaths) |rpath| {2171 for (rpaths) |rpath| {
2172 const cmdsize = @intCast(u32, mem.alignForwardGeneric(2172 const cmdsize = @intCast(u32, mem.alignForwardGeneric(
2173 u64,2173 u64,
2174 @sizeOf(macho.rpath_command) + rpath.len,2174 @sizeOf(macho.rpath_command) + rpath.len + 1,
2175 @sizeOf(u64),2175 @sizeOf(u64),
2176 ));2176 ));
2177 var rpath_cmd = emptyGenericCommandWithData(macho.rpath_command{2177 var rpath_cmd = emptyGenericCommandWithData(macho.rpath_command{