diff options
Diffstat (limited to 'crypto/ec/ec_oct.c')
| -rw-r--r-- | crypto/ec/ec_oct.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ec/ec_oct.c b/crypto/ec/ec_oct.c index 790a0b290771..2b77e9738883 100644 --- a/crypto/ec/ec_oct.c +++ b/crypto/ec/ec_oct.c @@ -74,6 +74,10 @@ size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx) { + if (point == NULL) { + ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER); + return 0; + } if (group->meth->point2oct == 0 && !(group->meth->flags & EC_FLAGS_DEFAULT_OCT)) { ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
