From 44ee1c885f056eb8d7163a6b455af5c268a83a76 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 30 Nov 2022 12:55:23 -0700 Subject: [PATCH] std.os.windows.ReadLink: add missing alignment of local data buffer --- lib/std/os/windows.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 93ec10e8be..d864f85b8d 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -802,7 +802,7 @@ pub fn ReadLink(dir: ?HANDLE, sub_path_w: []const u16, out_buffer: []u8) ReadLin } defer CloseHandle(result_handle); - var reparse_buf: [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]u8 = undefined; + var reparse_buf: [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]u8 align(@alignOf(REPARSE_DATA_BUFFER)) = undefined; _ = DeviceIoControl(result_handle, FSCTL_GET_REPARSE_POINT, null, reparse_buf[0..]) catch |err| switch (err) { error.AccessDenied => unreachable, else => |e| return e,