diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-03 19:45:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-03 19:45:17 +0000 |
commit | c35b129adcbbf28486b31be19635c768f80d16b9 (patch) | |
tree | e2071ead1ac15ee1cc5081c323db326b226b93f2 | |
parent | dfec7bdab8eb3154e28987204b8267720ae6c202 (diff) |
Spotted another opportunity to use reallocarray().
ok miod
-rw-r--r-- | lib/libcrypto/ec/ec_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/ec/ec_print.c b/lib/libcrypto/ec/ec_print.c index 45d20b29a50..1c142a1df59 100644 --- a/lib/libcrypto/ec/ec_print.c +++ b/lib/libcrypto/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; |