From 69912a7594ccff92b51a8827ed367eb1dc972ac7 Mon Sep 17 00:00:00 2001 From: Yuriy Syrota Date: Tue, 22 Oct 2024 21:38:17 +0300 Subject: [PATCH] Fix an issue found by Coverity Scan --- lib/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.c b/lib/util.c index 4627a96..1fa8ce6 100644 --- a/lib/util.c +++ b/lib/util.c @@ -68,7 +68,7 @@ duo_common_ini_handler(struct duo_config *cfg, const char *section, size_t j = 0; int inEscape = 0; char *currWord; - if ((currWord = malloc(len)) == NULL) { + if ((currWord = malloc(len + 1)) == NULL) { fprintf(stderr, "Out of memory parsing groups\n"); return (0); }