Page MenuHomeFreeBSD

D58070.diff
No OneTemporary

D58070.diff

diff --git a/stand/efi/loader/decompress.c b/stand/efi/loader/decompress.c
--- a/stand/efi/loader/decompress.c
+++ b/stand/efi/loader/decompress.c
@@ -335,10 +335,14 @@
printf("Too much data recieved!");
return (err);
}
+ if ((uintptr_t)dctx->buf_cur - (uintptr_t)dctx->buf != offset) {
+ printf("OH NO! The offset is %llu but I expected %llu\n", ULL(offset),
+ ULL((uintptr_t)dctx->buf_cur - (uintptr_t)dctx->buf));
+ return (err);
+ }
- CHAR8 *src = buf;
- CHAR8 *dst = (void*)(uintptr_t)(dctx->buf + offset);
- BS->CopyMem(dst, src, len);
+ memcpy(dctx->buf_cur, buf, len);
+ dctx->buf_cur += len;
return (end == dctx->size ? done : ok);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 16, 7:29 AM (6 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34830031
Default Alt Text
D58070.diff (666 B)

Event Timeline