fix [#28658] python can assign non utf8 and crash because of string lenth limits.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Sep 2011 11:49:36 +0000 (11:49 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Sep 2011 11:49:36 +0000 (11:49 +0000)
commit9648c6016b35a72aa23395f5d200e342df16490b
treee9e5184d1039db277ff45ca162b621f2bad8b861
parent86d05b31446d8960679ece640089474afe5577d9
fix [#28658] python can assign non utf8 and crash because of string lenth limits.

add BLI_strncpy_utf8() which which ensures there are no partially copied UTF8 characters, limited by the buffer size.
source/blender/blenlib/BLI_string.h
source/blender/blenlib/intern/string_utf8.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c