grub/grub-core/tests
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
..
boot kernel-8086: Switch to more portable .org. 2015-02-21 20:24:59 +01:00
lib strtoull: Fix behaviour on chars between '9' and 'a'. 2017-05-03 12:59:58 +02:00
bswap_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
checksums.h Regenerate checksum.h with newer unifont. 2017-08-30 17:12:04 +02:00
cmdline_cat_test.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
cmp_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
ctz_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
div_test.c Supply signed division to fix ARM compilation. 2015-02-23 04:12:04 +01:00
example_functional_test.c The old code gives arguments to a printf function which can't work 2012-05-27 14:26:18 +02:00
fake_input.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
gfxterm_menu.c core: use GRUB_TERM_ definitions when handling term characters 2017-08-07 19:28:22 +02:00
legacy_password_test.c * grub-core/tests/legacy_password_test.c (vectors): Make static. 2013-11-12 15:59:58 +01:00
mul_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
pbkdf2_test.c * grub-core/tests/legacy_password_test.c (vectors): Make static. 2013-11-12 15:59:58 +01:00
setjmp_test.c i386, x86_64, ppc: fix switch fallthrough cases with GCC7 2017-04-04 19:23:55 +03:00
shift_test.c Remove libgcc dependency. 2015-03-03 20:50:37 +01:00
signature_test.c * grub-core/tests/signature_test.c: New test. 2013-11-12 16:05:57 +01:00
signatures.h * grub-core/tests/signature_test.c: New test. 2013-11-12 16:05:57 +01:00
sleep_test.c arm: Ignore qemu clock bug 2016-01-22 10:12:43 +01:00
strtoull_test.c misc: Make grub_strtol() "end" pointers have safer const qualifiers 2020-02-28 12:41:29 +01:00
test_blockarg.c * grub-core/commands/acpi.c: Add TRANSLATORS comments. 2012-03-06 14:11:10 +01:00
video_checksum.c calloc: Use calloc() at most places 2020-07-29 16:55:47 +02:00
videotest_checksum.c * grub-core/tests/videotest_checksum.c: Don't reload unifont if it's 2013-11-18 14:38:31 +01:00
xnu_uuid_test.c * grub-core/tests/xnu_uuid_test.c: Fix assert message. 2013-11-12 14:11:34 +01:00