diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-05-22 21:52:04 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-05-22 21:52:04 +0200 |
commit | 4e5b596bbaa4a7b6114df0c293622ebf4fb94bef (patch) | |
tree | 4ce8421ccf9c7c2c827783a2616b085fa2649f38 /sys/src/boot | |
parent | 66b1a83b7468fe35e11996ca1b12d00fe41f75c5 (diff) |
efi: ensure 8 byte alignment of buffer, as ReadBlocks() method will fail otherwise
Diffstat (limited to 'sys/src/boot')
-rw-r--r-- | sys/src/boot/efi/iso.c | 5 | ||||
-rw-r--r-- | sys/src/boot/efi/pxe.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/src/boot/efi/iso.c b/sys/src/boot/efi/iso.c index f994419cd..05b54ca4a 100644 --- a/sys/src/boot/efi/iso.c +++ b/sys/src/boot/efi/iso.c @@ -171,9 +171,10 @@ Foundpvd: static void* isoopen(char *path) { - static Extend ex[1]; + static uchar buf[sizeof(Extend)+8]; + Extend *ex = (Extend*)((uintptr)(buf+7)&~7); - if(isowalk(ex, path)) + if(isowalk(ex, path)) return nil; return ex; } diff --git a/sys/src/boot/efi/pxe.c b/sys/src/boot/efi/pxe.c index 87d7a7e2b..5058a845f 100644 --- a/sys/src/boot/efi/pxe.c +++ b/sys/src/boot/efi/pxe.c @@ -306,7 +306,8 @@ tftpopen(Tftp *t, char *path) static void* pxeopen(char *name) { - static Tftp t[1]; + static uchar buf[sizeof(Tftp)+8]; + Tftp *t = (Tftp*)((uintptr)(buf+7)&~7); memset(t, 0, sizeof(Tftp)); |