Home GnuPG

mceliece6688128f: fix stack overflow crash on win64/wine

Description

mceliece6688128f: fix stack overflow crash on win64/wine

* cipher/mceliece6688128f.c (pk_gen): Remove 'mat' array allocation and
rename function to ...
(pk_gen_mat): ... this.
(pk_gen): New wrapper for 'pk_gen_mat' with dynamic allocation of 'mat'
array.

Huge array allocations from stack are not always guaranteed to work on
every target platform, so avoid allocating multi-megabyte 'mat' array
from stack.

v2: zero 'mat' array after use.
v3: use 'const size_t' type for 'sizeof_mat'.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Fri, Sep 26, 8:45 AM
Parents
rC593525b4ce43: t-kem: add info print for each algoritm
Branches
Unknown
Tags
Unknown