Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-15 09:09:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 09:09:06 +0400
commit2b6f35d686a35a347aec93cae2f018b1f7312834 (patch)
tree1e76ab3688a3470aa1103804135387868ec80306 /source/blender/blenkernel/intern/font.c
parent02f5b0fc08e979dab65a7bc1ee0383098ac99b2e (diff)
fix for error in string copy
- BLI_strncpy_wchar_from_utf8 wasn't NULL terminating the destination string, caused uninitialized memory use in BPY_python_start(). - BLI_strncpy_wchar_as_utf8 could write one byte past the buffer bounds.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index b3edeb67928..7c23438f93d 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -516,7 +516,7 @@ struct CharTrans *BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int
/* Create unicode string */
utf8len = BLI_strlen_utf8(cu->str);
- mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
+ mem = MEM_mallocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
BLI_strncpy_wchar_from_utf8(mem, cu->str, utf8len + 1);