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
Vladimir Testov
4db2250000
* grub-core/gfxmenu/gui_box.c: Updated to work with area status.
...
* grub-core/gfxmenu/gui_canvas.c: Likewise.
* grub-core/gfxmenu/view.c: Likewise.
* grub-core/video/fb/video_fb.c: Introduce new functions:
grub_video_set_area_status, grub_video_get_area_status,
grub_video_set_region, grub_video_get_region.
* grub-core/video/bochs.c: Likewise.
* grub-core/video/capture.c: Likewise.
* grub-core/video/video.c: Likewise.
* grub-core/video/cirrus.c: Likewise.
* grub-core/video/efi_gop.c: Likewise.
* grub-core/video/efi_uga.c: Likewise.
* grub-core/video/emu/sdl.c: Likewise.
* grub-core/video/radeon_fuloong2e.c: Likewise.
* grub-core/video/sis315pro.c: Likewise.
* grub-core/video/sm712.c: Likewise.
* grub-core/video/i386/pc/vbe.c: Likewise.
* grub-core/video/i386/pc/vga.c: Likewise.
* grub-core/video/ieee1275.c: Likewise.
* grub-core/video/i386/coreboot/cbfb.c: Likewise.
* include/grub/video.h: Likewise.
* include/grub/video_fb.h: Likewise.
* include/grub/fbfill.h: Updated render_target structure.
grub_video_rect_t viewport, region, area
int area_offset_x, area_offset_y, area_enabled
* include/grub/gui.h: New helper function
grub_video_bounds_inside_region.
* docs/grub-dev.texi: Added information about new functions.
2013-11-08 15:42:38 +04:00
Vladimir 'phcoder' Serbinenko
a8905e8ae8
Several fixes to ieee1275 and big-endian video.
2013-05-02 22:30:20 +02:00
Vladimir 'phcoder' Serbinenko
e745cf0ca6
Implement automatic module license checking according to new GNU
...
guidelines.
* grub-core/kern/dl.c (grub_dl_check_license): New function.
(grub_dl_load_core): Use grub_dl_check_license.
* include/grub/dl.h (GRUB_MOD_SECTION): New macro.
(GRUB_MOD_LICENSE): Likewise.
(GRUB_MOD_DUAL_LICENSE): Likewise.
All modules updated.
2011-04-11 23:01:51 +02:00
BVK Chaitanya
297f0c2b6e
merge with mainline
2010-07-13 00:43:28 +05:30
BVK Chaitanya
8c41176882
automake commit without merge history
2010-05-06 11:34:04 +05:30