[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] font: Check return value of grub_malloc() in ascii_glyph
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 1/5] font: Check return value of grub_malloc() in ascii_glyph_lookup() |
Date: |
Tue, 13 Dec 2022 18:16:41 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Dec 05, 2022 at 07:29:36PM +0800, Zhang Boyang wrote:
> There is a problem in ascii_glyph_lookup(). It doesn't check the return
> value of grub_malloc(). If memory can't be allocated, then NULL pointer
> will be written to.
>
> This patch fixes the problem by fallbacking to unknown_glyph in case of
> grub_malloc() returns NULL.
>
> Signed-off-by: Zhang Boyang <zhangboyang.id@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
- [PATCH 0/5] Font fixes and preliminary HiDPI support, Zhang Boyang, 2022/12/05
- [PATCH 1/5] font: Check return value of grub_malloc() in ascii_glyph_lookup(), Zhang Boyang, 2022/12/05
- Re: [PATCH 1/5] font: Check return value of grub_malloc() in ascii_glyph_lookup(),
Daniel Kiper <=
- [PATCH 2/5] font: Assign null_font to unknown_glyph, Zhang Boyang, 2022/12/05
- [PATCH 3/5] font: Reject fonts with negative max_char_width or max_char_height, Zhang Boyang, 2022/12/05
- [PATCH 4/5] font: Add font scaling feature to grub_font_draw_glyph(), Zhang Boyang, 2022/12/05
- [PATCH 5/5] term/gfxterm: Preliminary HiDPI support, Zhang Boyang, 2022/12/05