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/efi/pxe.c | |
parent | 66b1a83b7468fe35e11996ca1b12d00fe41f75c5 (diff) |
efi: ensure 8 byte alignment of buffer, as ReadBlocks() method will fail otherwise
Diffstat (limited to 'sys/src/boot/efi/pxe.c')
-rw-r--r-- | sys/src/boot/efi/pxe.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)); |