From 69cf40da600224734d39c6f64fb2e0905e42d54a Mon Sep 17 00:00:00 2001 From: AsmArtisan256 Date: Fri, 18 Jul 2025 20:07:05 +0100 Subject: [PATCH] std.os.uefi.protocol.file: fix getInfo() buffer alignment (#24496) * std.os.uefi.protocol.file: use @alignCast in getInfo() method to fix #24480 * std.os.uefi.protocol.file: pass alignment responsabilities to caller by redefining the buffer type instead of blindly calling @alignCast --- lib/std/os/uefi/protocol/file.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/os/uefi/protocol/file.zig b/lib/std/os/uefi/protocol/file.zig index f8802fa64f..0654dec14a 100644 --- a/lib/std/os/uefi/protocol/file.zig +++ b/lib/std/os/uefi/protocol/file.zig @@ -214,7 +214,7 @@ pub const File = extern struct { pub fn getInfo( self: *const File, comptime info: std.meta.Tag(Info), - buffer: []u8, + buffer: []align(@alignOf(@FieldType(Info, @tagName(info)))) u8, ) GetInfoError!*@FieldType(Info, @tagName(info)) { const InfoType = @FieldType(Info, @tagName(info));