From 3e43d6d37041b251cd969f9ec33271cb1c37b8a0 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 10 Feb 2011 12:46:42 -0500 Subject: [PATCH] ust_safe_snprintf should check print format Signed-off-by: Mathieu Desnoyers --- include/usterr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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...) \ { \ -- 2.34.1