test/sslapitest.c: tfix in row allocation in create_new_vfile

sizeof(*row) and not sizeof(row) is supposed to be used for the array
allocation.

Fixes: 76fd7a1d61 "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)
This commit is contained in:
Eugene Syromiatnikov 2025-08-12 09:28:00 +02:00 committed by Neil Horman
parent 5e34d64760
commit abebeb1bb0
1 changed files with 1 additions and 1 deletions

View File

@ -7969,7 +7969,7 @@ static int ssl_srp_cb(SSL *s, int *ad, void *arg)
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);