[PATCH] cipher:pk:sexp: Remove bogus checks in SEXP parsing.

Jacob Bachmeyer jcb62281 at gmail.com
Wed Jun 18 03:55:16 CEST 2025


On 6/17/25 00:31, NIIBE Yutaka via Gcrypt-devel wrote:
> * cipher/pubkey-util.c (_gcry_pk_util_data_to_mpi): Remove bogus check
> for VALUELEN.

NACK!  NACK!  NACK!

Those are checks for integer overflow.  (They may even be correct if 
VALUELEN is unsigned.)

If VALUELEN is a signed type, they are undefined behavior and need to be 
fixed, not removed.


-- Jacob




More information about the Gcrypt-devel mailing list