diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-12-03 14:37:55 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-12-03 14:37:55 +0200 |
commit | 522a4d02e3f87607dfcda0c7c391ea2c1f40813e (patch) | |
tree | c02aaefb5937db85a7f756199a708cd7972ffad8 /indra | |
parent | c0ecaeb5d8121d5cd81e94a646b448b84a475550 (diff) |
MAINT-3506 FIXED Allocate appropriate amount of memory for temp variable.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.mm | 2 |
1 files changed, 1 insertions, 1 deletions
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; |