Skip to content
Snippets Groups Projects
Commit 65dfa117 authored by Peter Jones's avatar Peter Jones Committed by Colin Watson
Browse files

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: default avatarPeter Jones <pjones@redhat.com>
Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>

Patch-Name: safe-alloc-3.patch
parent f80ca28e
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 44 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment