From 44c9da02b72b146dbbcafcaec3c3976d04f5c0df Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Thu, 29 May 2014 21:19:30 +0000 Subject: ok, next pass after review: when possible, put the reallocarray arguments in the "size_t nmemb, size_t size" --- src/lib/libcrypto/txt_db/txt_db.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/txt_db') diff --git a/src/lib/libcrypto/txt_db/txt_db.c b/src/lib/libcrypto/txt_db/txt_db.c index 0f3a7ffbb3..e29a60316a 100644 --- a/src/lib/libcrypto/txt_db/txt_db.c +++ b/src/lib/libcrypto/txt_db/txt_db.c @@ -94,9 +94,9 @@ TXT_DB_read(BIO *in, int num) ret->qual = NULL; if ((ret->data = sk_OPENSSL_PSTRING_new_null()) == NULL) goto err; - if ((ret->index = reallocarray(NULL, sizeof(*ret->index), num)) == NULL) + if ((ret->index = reallocarray(NULL, num, sizeof(*ret->index))) == NULL) goto err; - if ((ret->qual = reallocarray(NULL, sizeof(*(ret->qual)), num)) == NULL) + if ((ret->qual = reallocarray(NULL, num, sizeof(*(ret->qual)))) == NULL) goto err; for (i = 0; i < num; i++) { ret->index[i] = NULL; -- cgit v1.2.3-55-g6feb