grub/grub-core/kern/emu
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
..
argp_common.c Build fixes for argp.h with older gcc. 2013-12-21 18:08:25 +01:00
cache.c RISC-V: Add to build system 2019-02-25 14:02:05 +01:00
cache_s.S RISC-V: Add to build system 2019-02-25 14:02:05 +01:00
full.c Implement sparc64 trampolines (needed for sparc64-emu). 2013-12-10 00:01:27 +01:00
hostdisk.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
hostfs.c hostfs: #undef open and close. 2019-06-07 15:36:28 +02:00
lite.c RISC-V: Add to build system 2019-02-25 14:02:05 +01:00
main.c Ensure that grub_reboot doesn't return on emu. 2017-01-27 20:10:23 +00:00
misc.c calloc: Make sure we always have an overflow-checking calloc() available 2020-07-29 16:55:47 +02:00
mm.c calloc: Make sure we always have an overflow-checking calloc() available 2020-07-29 16:55:47 +02:00
time.c automake commit without merge history 2010-05-06 11:34:04 +05:30