diff options
author | Martin Storsjö <martin@martin.st> | 2011-06-17 10:31:11 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2011-06-23 20:17:46 +0300 |
commit | 9abbe8cc136e7fbc69004df3f1de9d54c40d969d (patch) | |
tree | eaa9dcee4f92e3a4cfb0911d4cd1eb6a0ae92813 /libavutil/avstring.h | |
parent | 67e9ae14d93aeee019bf65d38192ca5c75dc99dd (diff) | |
download | ffmpeg-9abbe8cc136e7fbc69004df3f1de9d54c40d969d.tar.gz |
Use av_printf_format to check the usage of printf style functions
This helps catching cases where the format string doesn't
match what is passed in, or injection bugs where user data
is passed in as format string.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/avstring.h')
-rw-r--r-- | libavutil/avstring.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/avstring.h b/libavutil/avstring.h index b40acf6ebb..44ed89d654 100644 --- a/libavutil/avstring.h +++ b/libavutil/avstring.h @@ -22,6 +22,7 @@ #define AVUTIL_AVSTRING_H #include <stddef.h> +#include "attributes.h" /** * Return non-zero if pfx is a prefix of str. If it is, *ptr is set to @@ -107,7 +108,7 @@ size_t av_strlcat(char *dst, const char *src, size_t size); * @return the length of the string that would have been generated * if enough space had been available */ -size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...); +size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_format(3, 4); /** * Convert a number to a av_malloced string. |