Page MenuHomeFreeBSD

D10559.id27888.diff
No OneTemporary

D10559.id27888.diff

Index: sys/boot/efi/libefi/efipart.c
===================================================================
--- sys/boot/efi/libefi/efipart.c
+++ sys/boot/efi/libefi/efipart.c
@@ -925,7 +925,15 @@
/* make sure we don't read past disk end */
if ((off + size) / blkio->Media->BlockSize > d_offset + disk_blocks) {
- size = d_offset + disk_blocks - off / blkio->Media->BlockSize;
+ size_t diskend = d_offset + disk_blocks;
+ size_t readstart = off / blkio->Media->BlockSize;
+
+ if (diskend <= readstart) {
+ *rsize = 0;
+
+ return (0);
+ }
+ size = diskend - readstart;
size = size * blkio->Media->BlockSize;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 4:16 PM (15 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15543015
Default Alt Text
D10559.id27888.diff (727 B)

Event Timeline