Re: [PATCH] block/partitions/efi.c: ensure that the GPT header isat least the size of the structure.

From: Stephen Rothwell
Date: Wed Feb 20 2013 - 16:08:53 EST


Hi Peter,

On Wed, 20 Feb 2013 09:37:01 -0500 Peter Jones <pjones@xxxxxxxxxx> wrote:
>
> + /* Check the GUID Partition Table header size is too small */
> + if (le32_to_cpu((*gpt)->header_size) < sizeof(gpt_header)) {
> + pr_debug("GUID Partition Table Header size is too small: %u < %lu\n",
> + le32_to_cpu((*gpt)->header_size),
> + (unsigned long)sizeof(gpt_header));

Don't do this. We have %zu to print size_t variables ...

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: pgp00000.pgp
Description: PGP signature