MAINT-3506 FIXED Allocate appropriate amount of memory for temp variable.

master
Mnikolenko ProductEngine 2013-12-03 14:37:55 +02:00
parent c0ecaeb5d8
commit 522a4d02e3
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ const unsigned short *copyFromPBoard()
NSArray *objToPaste = [pboard readObjectsForClasses:classArray options:[NSDictionary dictionary]];
str = [objToPaste objectAtIndex:0];
}
unichar* temp = (unichar*)calloc([str length], sizeof(unichar));
unichar* temp = (unichar*)calloc([str length]+1, sizeof(unichar));
[str getCharacters:temp];
[pool release];
return temp;