[Bf-blender-cvs] [486be2219ab] blender2.8: Use proper buffer size for statistics
Sergey Sharybin
noreply at git.blender.org
Tue Dec 18 12:54:56 CET 2018
Commit: 486be2219ab6a0d40ae8108cf7a2de86fbda21e3
Author: Sergey Sharybin
Date: Tue Dec 18 12:54:34 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB486be2219ab6a0d40ae8108cf7a2de86fbda21e3
Use proper buffer size for statistics
===================================================================
M source/blender/blenlib/intern/string.c
===================================================================
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index a92b226d033..f29636eb55c 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -1026,7 +1026,9 @@ size_t BLI_str_format_int_grouped(char dst[16], int num)
*/
size_t BLI_str_format_uint64_grouped(char dst[16], uint64_t num)
{
- char src[16];
+ /* NOTE: Buffer to hold maximum unsigned int64, which is 1.8e+19. but
+ * we also need space for commas and null-terminator. */
+ char src[27];
int num_len = sprintf(src, "%"PRIu64"", num);
return BLI_str_format_int_grouped_ex(src, dst, num_len);
More information about the Bf-blender-cvs
mailing list