mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-20 22:53:16 +00:00
disk/geli: Add missing seek success check.
Found by: Coverity scan.
This commit is contained in:
parent
f2baeb194b
commit
6f43e350ed
@ -212,7 +212,8 @@ grub_util_get_geli_uuid (const char *dev)
|
|||||||
|
|
||||||
s = grub_util_get_fd_size (fd, dev, &log_secsize);
|
s = grub_util_get_fd_size (fd, dev, &log_secsize);
|
||||||
s >>= log_secsize;
|
s >>= log_secsize;
|
||||||
grub_util_fd_seek (fd, (s << log_secsize) - 512);
|
if (grub_util_fd_seek (fd, (s << log_secsize) - 512) < 0)
|
||||||
|
grub_util_error ("%s", _("couldn't read ELI metadata"));
|
||||||
|
|
||||||
uuid = xmalloc (GRUB_MD_SHA256->mdlen * 2 + 1);
|
uuid = xmalloc (GRUB_MD_SHA256->mdlen * 2 + 1);
|
||||||
if (grub_util_fd_read (fd, (void *) &hdr, 512) < 0)
|
if (grub_util_fd_read (fd, (void *) &hdr, 512) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user