grub/grub-core/partmap
Peter Jones f725fa7cb2 calloc: Use calloc() at most places
This modifies most of the places we do some form of:

  X = malloc(Y * Z);

to use calloc(Y, Z) instead.

Among other issues, this fixes:
  - allocation of integer overflow in grub_png_decode_image_header()
    reported by Chris Coulson,
  - allocation of integer overflow in luks_recover_key()
    reported by Chris Coulson,
  - allocation of integer overflow in grub_lvm_detect()
    reported by Chris Coulson.

Fixes: CVE-2020-14308

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2020-07-29 16:55:47 +02:00
..
acorn.c cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
amiga.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
apple.c * grub-core/partmap/apple.c (apple_partition_map_iterate): Add 2013-04-01 02:58:47 +02:00
bsdlabel.c cleanup: grub_cpu_to_XXX_compile_time for constants 2014-09-22 20:47:10 +04:00
dfly.c * grub-core/partmap/dfly.c: Simplify dprintfs for easier gettext 2013-08-02 22:56:20 +02:00
dvh.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
gpt.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
msdos.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
plan.c Remove nested functions from device iterators. 2013-01-20 15:52:15 +00:00
sun.c core/partmap: rename 'sun' to avoid clash with predefined symbol 2015-04-13 19:49:15 +03:00
sunpc.c core/partmap: rename 'sun' to avoid clash with predefined symbol 2015-04-13 19:49:15 +03:00