diff options
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 17abcf52ecc..fb02ea5fb17 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -206,6 +206,13 @@ char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1, 2); /** + * A wrapper around ::sprintf() which does not generate security warnings. + * + * \note Use BLI_snprintf for cases when the string size is known. + */ +int BLI_sprintf(char *__restrict str, const char *__restrict format, ...); + +/** * This roughly matches C and Python's string escaping with double quotes - `"`. * * Since every character may need escaping, |