authorgravatar for asm.artisan256@gmail.comAsmArtisan256 <asm.artisan256@gmail.com> 2025-07-18 20:07:05+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-07-18 19:07:05+00:00
log69cf40da600224734d39c6f64fb2e0905e42d54a
treefff621b4f005569587d4da8edd2b042c8c9e50b1
parent6e5589866193a6bd73c75b126adeecd71924b6f5
signaturebadge-check Signed by PGP key B5690EEEBB952194

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

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

lib/std/os/uefi/protocol/file.zig+1-1
...@@ -214,7 +214,7 @@ pub const File = extern struct {...@@ -214,7 +214,7 @@ pub const File = extern struct {
214 pub fn getInfo(214 pub fn getInfo(
215 self: *const File,215 self: *const File,
216 comptime info: std.meta.Tag(Info),216 comptime info: std.meta.Tag(Info),
217 buffer: []u8,217 buffer: []align(@alignOf(@FieldType(Info, @tagName(info)))) u8,
218 ) GetInfoError!*@FieldType(Info, @tagName(info)) {218 ) GetInfoError!*@FieldType(Info, @tagName(info)) {
219 const InfoType = @FieldType(Info, @tagName(info));219 const InfoType = @FieldType(Info, @tagName(info));
220220