Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162638884
D58070.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
666 B
Referenced Files
None
Subscribers
None
D58070.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D58070: loader.efi: Simplify the code for null decompression a little
Attached
Detach File
Event Timeline
Log In to Comment