diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/ec/ec_print.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ec/ec_print.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ec_print.c b/src/lib/libcrypto/ec/ec_print.c index 1c142a1df5..af4d1996c0 100644 --- a/src/lib/libcrypto/ec/ec_print.c +++ b/src/lib/libcrypto/ec/ec_print.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_print.c,v 1.6 2014/12/03 19:45:16 deraadt Exp $ */ | 1 | /* $OpenBSD: ec_print.c,v 1.7 2014/12/03 19:53:20 deraadt Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -131,7 +131,7 @@ EC_POINT_point2hex(const EC_GROUP * group, const EC_POINT * point, | |||
131 | 131 | ||
132 | buf_len = EC_POINT_point2oct(group, point, form, | 132 | buf_len = EC_POINT_point2oct(group, point, form, |
133 | NULL, 0, ctx); | 133 | NULL, 0, ctx); |
134 | if (buf_len == 0) | 134 | if (buf_len == 0 || buf_len + 1 == 0) |
135 | return NULL; | 135 | return NULL; |
136 | 136 | ||
137 | if ((buf = malloc(buf_len)) == NULL) | 137 | if ((buf = malloc(buf_len)) == NULL) |
diff --git a/src/lib/libssl/src/crypto/ec/ec_print.c b/src/lib/libssl/src/crypto/ec/ec_print.c index 1c142a1df5..af4d1996c0 100644 --- a/src/lib/libssl/src/crypto/ec/ec_print.c +++ b/src/lib/libssl/src/crypto/ec/ec_print.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_print.c,v 1.6 2014/12/03 19:45:16 deraadt Exp $ */ | 1 | /* $OpenBSD: ec_print.c,v 1.7 2014/12/03 19:53:20 deraadt Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -131,7 +131,7 @@ EC_POINT_point2hex(const EC_GROUP * group, const EC_POINT * point, | |||
131 | 131 | ||
132 | buf_len = EC_POINT_point2oct(group, point, form, | 132 | buf_len = EC_POINT_point2oct(group, point, form, |
133 | NULL, 0, ctx); | 133 | NULL, 0, ctx); |
134 | if (buf_len == 0) | 134 | if (buf_len == 0 || buf_len + 1 == 0) |
135 | return NULL; | 135 | return NULL; |
136 | 136 | ||
137 | if ((buf = malloc(buf_len)) == NULL) | 137 | if ((buf = malloc(buf_len)) == NULL) |