From: Mathieu Desnoyers Date: Thu, 10 Feb 2011 17:46:42 +0000 (-0500) Subject: ust_safe_snprintf should check print format X-Git-Tag: v0.12~68 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3e43d6d37041b251cd969f9ec33271cb1c37b8a0;p=ust.git ust_safe_snprintf should check print format Signed-off-by: Mathieu Desnoyers --- diff --git a/include/usterr.h b/include/usterr.h index f0cdeb0..3ec7ae0 100644 --- a/include/usterr.h +++ b/include/usterr.h @@ -42,7 +42,8 @@ * signal handlers, so we must use a print method which is signal safe. */ -extern int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...); +extern int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...) + __attribute__ ((format (printf, 3, 4))); #define sigsafe_print_err(fmt, args...) \ { \