Commit Graph

7 Commits

Author SHA1 Message Date
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
Andrei Borzenkov dbb0f9fa4f efiemu: fix memory leak
Found by: Coverity scan.
CID: 156610
2016-01-12 21:52:50 +03:00
Andrei Borzenkov 97c41e1216 efiemu: fix unintended sign extension
Found by: Coverity scan.
CID: 73883, 73637
2016-01-09 11:36:42 +03:00
Vladimir 'phcoder' Serbinenko 0331e102c9 Efiemu stylistic fixes and gettext.
* grub-core/efiemu/i386/loadcore32.c
	(grub_arch_efiemu_relocate_symbols32): Avoid set in if.
	* grub-core/efiemu/i386/loadcore64.c
	(grub_arch_efiemu_relocate_symbols64): Likewise.
	* grub-core/efiemu/i386/pc/cfgtables.c
	(grub_machine_efiemu_init_tables): Likewise.
	* grub-core/efiemu/loadcore.c (grub_efiemu_resolve_symbols): Likewise.
	(grub_efiemu_loadcore_initXX): Add a filename argument.
	All users updated.
	Improved error message.
	* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_init):
	Add a filename argument.
	All users updated.
	* grub-core/efiemu/symbols.c (grub_efiemu_set_virtual_address_map):
	Reclassify double relocation as GRUB_ERR_BUG.
2012-02-12 18:43:39 +01:00
Vladimir 'phcoder' Serbinenko 9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko 16bd6cfab2 Merge mainline into newreloc. For now without boot tests 2010-08-25 03:25:18 +02:00
BVK Chaitanya 8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30