diff options
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/sprintf.c | 4 | ||||
-rw-r--r-- | lib/libc/stdio/vsprintf.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c index ca59a9c171e..ebeda39755a 100644 --- a/lib/libc/stdio/sprintf.c +++ b/lib/libc/stdio/sprintf.c @@ -31,7 +31,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: sprintf.c,v 1.6 2003/06/02 20:18:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: sprintf.c,v 1.7 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -39,6 +39,8 @@ static char rcsid[] = "$OpenBSD: sprintf.c,v 1.6 2003/06/02 20:18:37 millert Exp #include <limits.h> #include "local.h" +__warn_references(sprintf, "warning: sprintf() is often misused, please use snprintf()"); + int sprintf(char *str, char const *fmt, ...) { diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c index 563b4082376..e3c099d0fb4 100644 --- a/lib/libc/stdio/vsprintf.c +++ b/lib/libc/stdio/vsprintf.c @@ -31,12 +31,15 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: vsprintf.c,v 1.5 2003/06/02 20:18:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: vsprintf.c,v 1.6 2003/06/11 21:03:10 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> #include <limits.h> +__warn_references(vsprintf, + "warning: vsprintf() is often misused, please use vsnprintf()"); + int vsprintf(str, fmt, ap) char *str; |