diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-11-09 11:11:17 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-12-06 10:40:11 +0000 |
commit | 935aa14344470d8a6936c8f174c15767cbd5f402 (patch) | |
tree | 4f81f2a26cac8a2939d6a080a09a957ef0987f70 /ssl | |
parent | 1f2958536eff61984b4746410cd3e4fe8f0383dd (diff) |
QUIC LCIDM: Minor fixes
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22673)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/quic_lcidm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ssl/quic/quic_lcidm.c b/ssl/quic/quic_lcidm.c index a79eab8781..0766f4aaf6 100644 --- a/ssl/quic/quic_lcidm.c +++ b/ssl/quic/quic_lcidm.c @@ -149,6 +149,9 @@ static QUIC_LCID *lcidm_get_lcid(const QUIC_LCIDM *lcidm, const QUIC_CONN_ID *lc key.cid = *lcid; + if (key.cid.id_len > QUIC_MAX_CONN_ID_LEN) + return NULL; + return lh_QUIC_LCID_retrieve(lcidm->lcids, &key); } @@ -208,6 +211,9 @@ static QUIC_LCID *lcidm_conn_new_lcid(QUIC_LCIDM *lcidm, QUIC_LCIDM_CONN *conn, { QUIC_LCID *lcid_obj; + if (lcid->id_len > QUIC_MAX_CONN_ID_LEN) + return NULL; + if ((lcid_obj = OPENSSL_zalloc(sizeof(*lcid_obj))) == NULL) return NULL; |