From 522a4d02e3f87607dfcda0c7c391ea2c1f40813e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 3 Dec 2013 14:37:55 +0200 Subject: MAINT-3506 FIXED Allocate appropriate amount of memory for temp variable. --- indra/llwindow/llwindowmacosx-objc.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 0768d0352e..ace1ec0e73 100755 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -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; -- cgit v1.2.3