Commit: c31e221d4fdde06c69edc16c444afac4e8ff4567
Author: Campbell Barton
Date:   Fri Aug 11 08:56:57 2017 +1000
Branches: master
https://developer.blender.org/rBc31e221d4fdde06c69edc16c444afac4e8ff4567

Fix crash checking for Blender version 10+

PyAPI could trigger this, for now just truncate.

===================================================================

M       source/blender/blenkernel/intern/appdir.c

===================================================================

diff --git a/source/blender/blenkernel/intern/appdir.c 
b/source/blender/blenkernel/intern/appdir.c
index 9afabdc0b4f..a5a907c0f79 100644
--- a/source/blender/blenkernel/intern/appdir.c
+++ b/source/blender/blenkernel/intern/appdir.c
@@ -106,7 +106,8 @@ const char *BKE_appdir_folder_default(void)
 static char *blender_version_decimal(const int ver)
 {
        static char version_str[5];
-       sprintf(version_str, "%d.%02d", ver / 100, ver % 100);
+       BLI_assert(ver < 1000);
+       BLI_snprintf(version_str, sizeof(version_str),"%d.%02d", ver / 100, ver 
% 100);
        return version_str;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to