diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-18 14:54:34 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-18 14:54:49 +0300 |
commit | 486be2219ab6a0d40ae8108cf7a2de86fbda21e3 (patch) | |
tree | 668396e66d46ff2d5727cc31e761228f3e4001bd | |
parent | e6c531353b842b671a3a32dc56a03d0b88e173d5 (diff) |
Use proper buffer size for statistics
-rw-r--r-- | source/blender/blenlib/intern/string.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |