mbedtls: CVE-2025-48965 fix

Backported from 3.6.x

Prevents a NULL pointer deference due to an unset variable
This commit is contained in:
Jeremy Newton 2025-10-31 22:11:52 -04:00
parent 07f4c1b44e
commit 44d047d496

View File

@ -453,6 +453,7 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data(
} else if (val_len == 0) {
mbedtls_free(cur->val.p);
cur->val.p = NULL;
cur->val.len = 0;
} else if (cur->val.len != val_len) {
/*
* Enlarge existing value buffer if needed