Merge pull request #8761 from valeriosetti/issue4681

Re-introduce enum-like checks from CHECK_PARAMS
This commit is contained in:
Gilles Peskine 2024-02-06 17:29:38 +00:00 committed by GitHub
commit 137e0c1a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 164 deletions

View file

@ -93,8 +93,6 @@ static void *(*const volatile memset_func)(void *, int, size_t) = memset;
void mbedtls_platform_zeroize(void *buf, size_t len)
{
MBEDTLS_INTERNAL_VALIDATE(len == 0 || buf != NULL);
if (len > 0) {
#if defined(MBEDTLS_PLATFORM_HAS_EXPLICIT_BZERO)
explicit_bzero(buf, len);