authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-10-23 10:15:42+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-10-23 10:15:42+02:00
log2f37278540e4783a236a2c095fc905e613fccf1d
tree82fe6703f435e7a3897442b791f1c7020ad2e1ae
parent1bbafbc65fafb9075f343ba18a42acd5e0f93e62

macho: temp hash buffer has to live as long as pread error resolution


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

src/link/MachO/CodeSignature.zig+3-3
......@@ -289,12 +289,12 @@ pub fn writeAdhocSignature(
289289 // Calculate hash for each page (in file) and write it to the buffer
290290 var wg: WaitGroup = .{};
291291 {
292 const buffer = try gpa.alloc(u8, self.page_size * total_pages);
293 defer gpa.free(buffer);
294
292295 const results = try gpa.alloc(fs.File.PReadError!usize, total_pages);
293296 defer gpa.free(results);
294297 {
295 const buffer = try gpa.alloc(u8, self.page_size * total_pages);
296 defer gpa.free(buffer);
297
298298 wg.reset();
299299 defer wg.wait();
300300