efi: ensure 8 byte alignment of buffer, as ReadBlocks() method will fail otherwise
This commit is contained in:
parent
66b1a83b74
commit
4e5b596bba
2 changed files with 5 additions and 3 deletions
|
@ -171,9 +171,10 @@ Foundpvd:
|
||||||
static void*
|
static void*
|
||||||
isoopen(char *path)
|
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 nil;
|
||||||
return ex;
|
return ex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -306,7 +306,8 @@ tftpopen(Tftp *t, char *path)
|
||||||
static void*
|
static void*
|
||||||
pxeopen(char *name)
|
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));
|
memset(t, 0, sizeof(Tftp));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue