mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 07:35:18 +00:00
Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -554,6 +554,7 @@ char * attribute_malloc _ast_strndup(const char *str, size_t len, const char *fi
|
||||
_ast_asprintf((ret), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, __VA_ARGS__)
|
||||
|
||||
AST_INLINE_API(
|
||||
__attribute__((format (printf, 5, 6)))
|
||||
int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...),
|
||||
{
|
||||
int res;
|
||||
@@ -580,6 +581,7 @@ int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, co
|
||||
_ast_vasprintf((ret), __FILE__, __LINE__, __PRETTY_FUNCTION__, (fmt), (ap))
|
||||
|
||||
AST_INLINE_API(
|
||||
__attribute__((format (printf, 5, 0)))
|
||||
int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, va_list ap),
|
||||
{
|
||||
int res;
|
||||
|
Reference in New Issue
Block a user