1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-07-07 22:40:33 +08:00
Manuel Pégourié-Gonnard 2df7ab7c0c Fix bug in mbedtls_asn1_store_named_data()
When passed a zero-length val, the function was free-ing the buffer as
the documentation suggests:

 * \param val_len   The minimum length of the data buffer needed.
 *                  If this is 0, do not allocate a buffer for the associated
 *                  data.
 *                  If the OID was already present, enlarge, shrink or free
 *                  the existing buffer to fit \p val_len.

However it kept the previous length, leaving the val structure in the
corresponding item in the output list in an inconsistent state:

    p == NULL but len != 0

As a result, functions that would try using this item in the list
(including the same function!) afterwards would trip an dereference the
NULL pointer.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2025-05-26 10:42:14 +02:00
..
2025-03-23 13:09:30 +00:00
2024-02-06 15:00:58 +00:00
2024-01-30 16:28:09 +01:00
2023-11-03 12:21:36 +00:00
2024-09-02 10:42:46 +02:00
2024-09-03 10:10:18 +02:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2025-03-18 17:11:54 +00:00
2023-11-03 12:21:36 +00:00
2023-12-01 13:53:45 +00:00
2024-01-17 11:06:31 +00:00
2023-11-03 12:21:36 +00:00
2023-11-21 17:09:46 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2024-03-13 09:55:33 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2025-03-23 13:09:30 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:24:58 +00:00
2023-11-03 12:21:36 +00:00
2024-03-11 09:48:40 +01:00
2024-03-11 09:48:40 +01:00
2024-10-14 10:37:00 +02:00
2024-07-11 17:31:22 +03:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2024-08-06 13:13:05 +02:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-21 17:09:46 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00
2025-04-16 11:20:50 +02:00
2023-11-03 12:21:36 +00:00
2024-11-14 14:19:40 +00:00
2023-11-03 12:21:36 +00:00
2023-11-03 12:21:36 +00:00