summaryrefslogtreecommitdiff
path: root/usr.bin/rdist/gram.y
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-30 07:36:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-30 07:36:45 +0000
commit0f62153ff22c58ff246e73db9768f9eac5dc1bc0 (patch)
tree99de4ff19cc127b9177e3c02a4c8af7239c2ae73 /usr.bin/rdist/gram.y
parentfbc3641e11aa4c7650b1951a473b7a5eadd38958 (diff)
snprintf in .y files
Diffstat (limited to 'usr.bin/rdist/gram.y')
-rw-r--r--usr.bin/rdist/gram.y9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/rdist/gram.y b/usr.bin/rdist/gram.y
index 9c813740aa7..6109f75e68a 100644
--- a/usr.bin/rdist/gram.y
+++ b/usr.bin/rdist/gram.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: gram.y,v 1.4 1998/06/26 21:21:11 millert Exp $ */
+/* $OpenBSD: gram.y,v 1.5 2002/05/30 07:36:44 deraadt Exp $ */
/*
* Copyright (c) 1993 Michael A. Cooper
@@ -41,7 +41,7 @@ static char RCSid[] =
"$From: gram.y,v 6.29 1994/04/11 23:59:15 mcooper Exp mcooper $";
#else
static char RCSid[] =
-"$OpenBSD: gram.y,v 1.4 1998/06/26 21:21:11 millert Exp $";
+"$OpenBSD: gram.y,v 1.5 2002/05/30 07:36:44 deraadt Exp $";
#endif
static char *sccsid = "@(#)gram.y 5.2 (Berkeley) 85/06/21";
@@ -351,7 +351,7 @@ again:
switch (yytext[1]) {
case 'o':
if (parsedistopts(&yytext[2], &opt, TRUE)) {
- (void) sprintf(ebuf,
+ (void) snprintf(ebuf, sizeof ebuf,
"Bad distfile options \"%s\".",
&yytext[2]);
yyerror(ebuf);
@@ -376,7 +376,8 @@ again:
case 'r': opt = DO_NODESCEND; break;
default:
- (void) sprintf(ebuf, "Unknown option \"%s\".", yytext);
+ (void) snprintf(ebuf, sizeof ebuf,
+ "Unknown option \"%s\".", yytext);
yyerror(ebuf);
}