(grub_md_sha512_real): Likewise.
(grub_util_get_geli_uuid): Likewise.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Likewise.
(grub_util_biosdisk_open): Fix format specification.
Respect format security.
* grub-core/kern/emu/misc.c (xmalloc): Respect format security.
(xrealloc): Likewise.
(xasprintf): Likewise.
+2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/disk/geli.c (grub_md_sha256_real): Respect format security.
+ (grub_md_sha512_real): Likewise.
+ (grub_util_get_geli_uuid): Likewise.
+ * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Likewise.
+ (grub_util_biosdisk_open): Fix format specification.
+ Respect format security.
+ * grub-core/kern/emu/misc.c (xmalloc): Respect format security.
+ (xrealloc): Likewise.
+ (xasprintf): Likewise.
+
2012-02-10 Vladimir Serbinenko <phcoder@gmail.com>
* util/import_gcry.py: Include grub/crypto.h in init.c.
const gcry_md_spec_t *ret;
ret = grub_crypto_lookup_md_by_name ("sha256");
if (!ret)
- grub_util_error (_("Coulnd't load sha256"));
+ grub_util_error ("%s", _("Coulnd't load sha256"));
return ret;
}
const gcry_md_spec_t *ret;
ret = grub_crypto_lookup_md_by_name ("sha512");
if (!ret)
- grub_util_error (_("Coulnd't load sha512"));
+ grub_util_error ("%s", _("Coulnd't load sha512"));
return ret;
}
uuid = xmalloc (GRUB_MD_SHA256->mdlen * 2 + 1);
if (grub_util_fd_read (fd, (void *) &hdr, 512) < 0)
- grub_util_error (_("couldn't read ELI metadata"));
+ grub_util_error ("%s", _("couldn't read ELI metadata"));
COMPILE_TIME_ASSERT (sizeof (header) <= 512);
header = (void *) &hdr;
if (grub_memcmp (header->magic, GELI_MAGIC, sizeof (GELI_MAGIC))
|| grub_le_to_cpu32 (header->version) > 5
|| grub_le_to_cpu32 (header->version) < 1)
- grub_util_error (_("wrong ELI magic or version"));
+ grub_util_error ("%s", _("wrong ELI magic or version"));
err = make_uuid ((void *) &hdr, uuid);
if (err)
return minfo.dki_capacity;
# else
if (nr & ((1 << log_sector_size) - 1))
- grub_util_error (_("unaligned device size"));
+ grub_util_error ("%s", _("unaligned device size"));
return (nr >> log_sector_size);
# endif
close (fd);
- grub_util_info ("the size of %s is %llu", name, disk->total_sectors);
+ grub_util_info ("the size of %s is %" PRIuGRUB_UINT64_T,
+ name, disk->total_sectors);
return GRUB_ERR_NONE;
}
return NULL;
if (i == ARRAY_SIZE (map))
- grub_util_error (_("device count exceeds limit"));
+ grub_util_error ("%s", _("device count exceeds limit"));
map[i].device = xstrdup (os_disk);
map[i].drive = xmalloc (sizeof ("hostdisk/") + strlen (os_disk));
p = malloc (size);
if (! p)
- grub_util_error (_("out of memory"));
+ grub_util_error ("%s", _("out of memory"));
return p;
}
{
ptr = realloc (ptr, size);
if (! ptr)
- grub_util_error (_("out of memory"));
+ grub_util_error ("%s", _("out of memory"));
return ptr;
}
if (vasprintf (&result, fmt, ap) < 0)
{
if (errno == ENOMEM)
- grub_util_error (_("out of memory"));
+ grub_util_error ("%s", _("out of memory"));
return NULL;
}