diff options
author | 2014-12-03 19:45:16 +0000 | |
---|---|---|
committer | 2014-12-03 19:45:16 +0000 | |
commit | 144e7222eea46d5144c057dfbf0920cc3ca0ff25 (patch) | |
tree | 0360181c014eb6344d0daec6252888fe0aafb2fd /lib/libssl/src | |
parent | document -o and -a; requested by yon (diff) | |
download | wireguard-openbsd-144e7222eea46d5144c057dfbf0920cc3ca0ff25.tar.xz wireguard-openbsd-144e7222eea46d5144c057dfbf0920cc3ca0ff25.zip |
Spotted another opportunity to use reallocarray().
ok miod
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/ec/ec_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/ec/ec_print.c b/lib/libssl/src/crypto/ec/ec_print.c index 45d20b29a50..1c142a1df59 100644 --- a/lib/libssl/src/crypto/ec/ec_print.c +++ b/lib/libssl/src/crypto/ec/ec_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_print.c,v 1.5 2014/06/12 15:49:29 deraadt Exp $ */ +/* $OpenBSD: ec_print.c,v 1.6 2014/12/03 19:45:16 deraadt Exp $ */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -141,7 +141,7 @@ EC_POINT_point2hex(const EC_GROUP * group, const EC_POINT * point, free(buf); return NULL; } - ret = malloc(buf_len * 2 + 2); + ret = reallocarray(NULL, buf_len + 1, 2); if (ret == NULL) { free(buf); return NULL; |