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
Colin Watson
92bbf25714
loader/bsd: Fix signed/unsigned comparison
2016-01-16 20:40:55 +00:00
Andrei Borzenkov
4f8fe948b9
loader: Unintended sign extension
...
CID: 96707, 96699, 96693, 96691, 96711, 96709, 96708, 96703, 96702,
96700, 96698, 96696, 96695, 96692, 96710, 96705
2016-01-15 19:18:05 +03:00
Andrei Borzenkov
806bb7999d
loader/bsd: fix memory leak
...
Found by: Coverity scan.
CID: 96662, 96665
2015-06-26 09:25:30 +03:00
Andrei Borzenkov
867c9b7bec
loader/bsd: free memory leaks
...
Found by: Coverity scan.
CID: 96671, 96658, 96653
2015-06-20 23:38:19 +03:00
Andrei Borzenkov
4a857e63c1
loader/bsd: free memory leaks
...
Found by: Coverity scan.
CID: 96682
2015-06-20 23:38:18 +03:00
Andrei Borzenkov
20211c0077
loader/bsd: fix memory leak
...
Found by: Coverity scan.
CID: 96686
2015-06-20 23:38:18 +03:00
Vladimir 'phcoder' Serbinenko
46ecfc49b6
* grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use
...
multiplication rather than division.
2013-03-10 20:37:41 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed
Another round of string clarification and adding TRANSLATORS comments.
2012-02-26 17:28:05 +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
384ad7cc1b
* grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Fix
...
current address calculation.
2011-12-15 19:32:41 +01:00
Vladimir 'phcoder' Serbinenko
8bc66a2ce6
* grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Account
...
for modules headers when counting the needed allocation size.
2011-03-24 12:28:22 +01:00
Vladimir 'phcoder' Serbinenko
43f1bc8369
* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta):
...
Silence spurious warning.
Reported and tested by: Alain Greppin.
2011-01-08 00:27:38 +01:00
Vladimir 'phcoder' Serbinenko
b12b923e63
* grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Silence
...
spurious warning.
Reported by: crocket
2010-12-31 12:37:35 +01:00
Szymon Janc
6bdda8f877
* grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
...
Set-but-not-used variable ifdef'ed.
* grub-core/lib/legacy_parse.c (grub_legacy_parse): Likewise.
* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Set-but-not-used
variable removed.
* grub-core/disk/lvm.c (grub_lvm_scan_device): Likewise.
* grub-core/fs/jfs.c (grub_jfs_find_file): Likewise.
* grub-core/fs/minix.c (grub_minix_dir): Likewise.
* grub-core/fs/sfs.c (grub_sfs_read_extent): Likewise.
* grub-core/fs/ufs.c (grub_ufs_dir): Likewise.
* grub-core/gfxmenu/gui_list.c (grub_gui_list_new): Likewise.
* grub-core/gfxmenu/view.c (redraw_menu_visit): Likewise.
* grub-core/gfxmenu/widget-box.c (draw): Likewise.
* grub-core/lib/relocator.c (malloc_in_range): Likewise.
* grub-core/loader/i386/bsdXX.c (grub_netbsd_load_elf_meta): Likewise.
* grub-core/loader/i386/bsd_pagetable.c (fill_bsd64_pagetable):
Likewise.
2010-10-16 22:16:52 +02:00
Vladimir 'phcoder' Serbinenko
ecde61b490
openbsd ramdisk support
2010-08-26 02:46:30 +02: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