sizeof(*row) and not sizeof(row) is supposed to be used for the array
allocation.
Fixes: 76fd7a1d6192 "Add a test for SRP"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=
1662054
Related: https://github.com/openssl/project/issues/1317
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28238)
static int create_new_vfile(char *userid, char *password, const char *filename)
{
char *gNid = NULL;
- OPENSSL_STRING *row = OPENSSL_calloc(DB_NUMBER + 1, sizeof(row));
+ OPENSSL_STRING *row = OPENSSL_calloc(DB_NUMBER + 1, sizeof(*row));
TXT_DB *db = NULL;
int ret = 0;
BIO *out = NULL, *dummy = BIO_new_mem_buf("", 0);