From 0ba072118e183214e98c714f29e2bd192574159f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 25 Jul 2022 08:01:38 +0200 Subject: [PATCH] calloc --- client/deps/cliparser/cliparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/deps/cliparser/cliparser.c b/client/deps/cliparser/cliparser.c index 980e3134d..bcdb4b3d8 100644 --- a/client/deps/cliparser/cliparser.c +++ b/client/deps/cliparser/cliparser.c @@ -33,7 +33,7 @@ // Example width set to 50 to allow help descriptions to align. approx line 93 int CLIParserInit(CLIParserContext **ctx, const char *vprogramName, const char *vprogramHint, const char *vprogramHelp) { - *ctx = malloc(sizeof(CLIParserContext)); + *ctx = calloc(sizeof(CLIParserContext), sizeof(uint8_t)); if (!*ctx) { PrintAndLogEx(ERR, "ERROR: Insufficient memory\n"); return 2;