diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-02-16 17:19:46 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-02-20 01:30:32 +0100 |
commit | 2e495c73d691391c763b79d11ad3c74504a85519 (patch) | |
tree | d8b40cc435eec65f51260ddd2c2bf18ca2527774 /thirdparty/mbedtls/library/ecp_curves.c | |
parent | aa5b99821b23d74eafb49f4b0d2d86fe693a903c (diff) |
Bump mbedTLS to version 2.16 (LTS version)
Diffstat (limited to 'thirdparty/mbedtls/library/ecp_curves.c')
-rw-r--r-- | thirdparty/mbedtls/library/ecp_curves.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/thirdparty/mbedtls/library/ecp_curves.c b/thirdparty/mbedtls/library/ecp_curves.c index 68e2441ae8..731621dc3c 100644 --- a/thirdparty/mbedtls/library/ecp_curves.c +++ b/thirdparty/mbedtls/library/ecp_curves.c @@ -28,11 +28,18 @@ #if defined(MBEDTLS_ECP_C) #include "mbedtls/ecp.h" +#include "mbedtls/platform_util.h" #include <string.h> #if !defined(MBEDTLS_ECP_ALT) +/* Parameter validation macros based on platform_util.h */ +#define ECP_VALIDATE_RET( cond ) \ + MBEDTLS_INTERNAL_VALIDATE_RET( cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA ) +#define ECP_VALIDATE( cond ) \ + MBEDTLS_INTERNAL_VALIDATE( cond ) + #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ !defined(inline) && !defined(__cplusplus) #define inline __inline @@ -746,6 +753,7 @@ cleanup: */ int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id id ) { + ECP_VALIDATE_RET( grp != NULL ); mbedtls_ecp_group_free( grp ); grp->id = id; |