From: Jakub Jelen Date: Fri, 6 Mar 2020 12:41:25 +0000 (+0100) Subject: pubkey: Validate input parameters in pubkey_import_ecc_raw X-Git-Tag: 3.6.13~14^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a5269279256220041db6cae1ecddbe5b038147dc;p=thirdparty%2Fgnutls.git pubkey: Validate input parameters in pubkey_import_ecc_raw Signed-off-by: Jakub Jelen --- diff --git a/lib/pubkey.c b/lib/pubkey.c index 0e0d0ada47..50214b2991 100644 --- a/lib/pubkey.c +++ b/lib/pubkey.c @@ -1447,7 +1447,7 @@ gnutls_pubkey_import_ecc_raw(gnutls_pubkey_t key, { int ret; - if (key == NULL) { + if (key == NULL || x == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } @@ -1485,6 +1485,11 @@ gnutls_pubkey_import_ecc_raw(gnutls_pubkey_t key, } /* ECDSA */ + if (y == NULL) { + gnutls_assert(); + return GNUTLS_E_INVALID_REQUEST; + } + key->params.curve = curve; if (_gnutls_mpi_init_scan_nz