]> git.ipfire.org Git - thirdparty/grub.git/commit
cryptodisk: Fix incorrect calculation of start sector
authorGlenn Washburn <development@efficientek.com>
Mon, 7 Sep 2020 15:27:59 +0000 (17:27 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 11 Sep 2020 13:51:04 +0000 (15:51 +0200)
commite1b0992a8d5bf63501240f188edb8479c62d1650
tree18449326e8964a6fc4e1537dd89fa55e868454cf
parent3b3ac0c982dd4a4baada91e968754429411cf868
cryptodisk: Fix incorrect calculation of start sector

Here dev is a grub_cryptodisk_t and dev->offset is offset in sectors of size
native to the cryptodisk device. The sector is correctly transformed into
native grub sector size, but then added to dev->offset which is not
transformed. It would be nice if the type system would help us with this.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Patrick Steinhardt <ps@pks.im>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c
include/grub/disk.h