From 94f40db019e23790726ee678d5d5d4c68b77ceb2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 22 Oct 2016 21:29:10 +0200 Subject: [PATCH] get_alt_digits: Fix typo in allocation adi->digit is an array of CHAR *, not of CHAR **. Fixes Coverity CID 60043 Signed-off-by: Corinna Vinschen --- newlib/libc/time/strftime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c index f11a00242..382318047 100644 --- a/newlib/libc/time/strftime.c +++ b/newlib/libc/time/strftime.c @@ -608,7 +608,7 @@ get_alt_digits (const char *alt_digits) ++adi->num; /* Allocate the `digit' array, which is an array of `num' pointers into `buffer'. */ - adi->digit = (CHAR **) calloc (adi->num, sizeof (CHAR **)); + adi->digit = (CHAR **) calloc (adi->num, sizeof (CHAR *)); if (!adi->digit) { free (adi);