Files
mbedtls/library
Gilles Peskine 995d89c9f2 Fix null pointer arithmetic in error case
When mbedtls_nist_kw_wrap was called with output=NULL and out_size=0, it
performed arithmetic on the null pointer before detecting that the output
buffer is too small and returning an error code. This was unlikely to have
consequences on real-world hardware today, but it is undefined behavior and
UBSan with Clang 10 flagged it. So fix it (fix #4025).

Fix a similar-looking pattern in unwrap, though I haven't verified that it's
reachable there.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-06-01 13:03:34 +02:00
..
2021-05-25 18:45:46 +02:00
2021-03-04 14:43:17 +00:00
2021-03-17 19:46:39 +01:00
2020-11-16 13:07:51 +01:00
2020-09-09 15:17:11 +02:00
2021-02-22 19:40:41 +01:00