Coverity CID 1362: Allocate one more element to appease coverity.

This commit is contained in:
christos 2006-03-26 22:08:59 +00:00
parent f2b8c717e8
commit d20b033359
1 changed files with 3 additions and 3 deletions

6
dist/cdk/cdk.c vendored
View File

@ -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;