Skip to contentSkip to conversation

really limit size of efidisk transfer to 0x500

PATCH New Andrey Borzenkov 1 participant 1 message Apr 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 really limit size of efidisk transfer to 0x500

Rev 4859 failed to actually limit transfer size.

---
 ChangeLog                    | 4 ++++
 grub-core/disk/efi/efidisk.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
ChangeLog +4 -0
index 6f33ff1..77a0819 100644
@@ -1,3 +1,7 @@
+2013-04-16  Andrey Borzenkov <[email protected]>
+
+	* grub-core/disk/efi/efidisk.c: Really limit transfer chunk size.
+
 2013-04-15  Vladimir Serbinenko  <[email protected]>
 2013-04-15  Peter Jones <[email protected]>
 
grub-core/disk/efi/efidisk.c +1 -1
index 5a6fc63..0e08d3b 100644
@@ -549,7 +549,7 @@ grub_efidisk_readwrite (struct grub_disk *disk, grub_disk_addr_t sector,
       status = efi_call_5 ((wr ? bio->write_blocks : bio->read_blocks), bio,
 			   bio->media->media_id,
 			   (grub_efi_uint64_t) sector,
-			   (grub_efi_uintn_t) size << disk->log_sector_size,
+			   (grub_efi_uintn_t) len << disk->log_sector_size,
 			   buf);
       size -= len;
       buf += len << disk->log_sector_size;
Signature · 1 line
tg: (1f1bfdf..) u/efi-disk-0x500 (depends on: master)