diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-30 14:07:50 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-30 14:07:50 +0400 |
commit | b3704f45c4e165618e898b5b7d1a7391ad14dc50 (patch) | |
tree | ede24044252d222084cc59cef98e28ebfe8494c3 /source/blender/python | |
parent | 27ec8d5043f544685001aab3552b9b4b56bc1e1a (diff) |
Fixes for snprintf usage:
* replace by BLI_snprintf in various places, note _snprintf on windows
does not properly null terminate the string.
* fix overflow in sequencer proxy code due to buffer being smaller than
specified size.
* fix some usage of snprintf as strcpy, this is will go wrong if the
string contains % characters.
* remove BLI_dynstr_printf function in gpu module, use BLI_dynstr_appendf
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 4abcbc684e2..e1c38a82142 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1251,7 +1251,7 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val) #if 0 // gives python decoding errors while generating docs :( char error_str[256]; - snprintf(error_str, sizeof(error_str), "RNA Warning: Current value \"%d\" matches no enum in '%s', '%s', '%s'", val, RNA_struct_identifier(ptr->type), ptr_name, RNA_property_identifier(prop)); + BLI_snprintf(error_str, sizeof(error_str), "RNA Warning: Current value \"%d\" matches no enum in '%s', '%s', '%s'", val, RNA_struct_identifier(ptr->type), ptr_name, RNA_property_identifier(prop)); PyErr_Warn(PyExc_RuntimeWarning, error_str); #endif |