In cb_dumphdr() we were calling buf_write() with di->priv as the
pointer to a dumperinfo instead of di. A brainfart, surely. This bug went unnoticed for all this time because the pointer is only used by buf_write() when it can write a completely filled buffer to the dump device. This depends on the number of memory chunks that needs to be dumped. This has apparently been low enough that it has never happened up until this point.
This commit is contained in:
parent
5775150869
commit
b019ad1bc0
@ -174,7 +174,7 @@ cb_dumphdr(EFI_MEMORY_DESCRIPTOR *mdp, int seqnr, void *arg)
|
||||
phdr.p_memsz = mdp->NumberOfPages << EFI_PAGE_SHIFT;
|
||||
phdr.p_align = EFI_PAGE_SIZE;
|
||||
|
||||
error = buf_write(di->priv, (char*)&phdr, sizeof(phdr));
|
||||
error = buf_write(di, (char*)&phdr, sizeof(phdr));
|
||||
fileofs += phdr.p_filesz;
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user