From d20b033359531d28b51555551f23a9ab61a6d550 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 26 Mar 2006 22:08:59 +0000 Subject: [PATCH] Coverity CID 1362: Allocate one more element to appease coverity. --- dist/cdk/cdk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/cdk/cdk.c b/dist/cdk/cdk.c index d932d4212b79..88ab47be117e 100644 --- a/dist/cdk/cdk.c +++ b/dist/cdk/cdk.c @@ -2,8 +2,8 @@ /* * $Author: christos $ - * $Date: 2006/03/26 22:04:14 $ - * $Revision: 1.5 $ + * $Date: 2006/03/26 22:08:59 $ + * $Revision: 1.6 $ */ char *GPasteBuffer = 0; @@ -373,7 +373,7 @@ chtype *char2Chtype (char *string, int *to, int *align) { if (result) free(result); - if ((result = (chtype *)malloc((used+2) * sizeof(chtype))) == 0) + if ((result = (chtype *)malloc((used+3) * sizeof(chtype))) == 0) { used = 0; break;