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>2011-09-15 15:49:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-15 15:49:36 +0400
commit9648c6016b35a72aa23395f5d200e342df16490b (patch)
treee9e5184d1039db277ff45ca162b621f2bad8b861 /source/blender/blenlib/BLI_string.h
parent86d05b31446d8960679ece640089474afe5577d9 (diff)
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.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r--source/blender/blenlib/BLI_string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index be77e18c24b..c53ce9dced5 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -144,6 +144,7 @@ void BLI_ascii_strtoupper(char *str, int len);
/* string_utf8.c - may move these into their own header some day - campbell */
+char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
int BLI_utf8_invalid_byte(const char *str, int length);
int BLI_utf8_invalid_strip(char *str, int length);