summaryrefslogtreecommitdiff
path: root/lib/libcurses/tinfo/captoinfo.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-03-17 19:17:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-03-17 19:17:00 +0000
commit61bb647481e36bb3a55aa63edc3cc4fa18c8a2ea (patch)
tree78a315d556cccb6c1c26d54d9f1dbb0a3e3dad7a /lib/libcurses/tinfo/captoinfo.c
parent5934993814e647644671dd601072bdd92890335a (diff)
use snprintf throughout
Diffstat (limited to 'lib/libcurses/tinfo/captoinfo.c')
-rw-r--r--lib/libcurses/tinfo/captoinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcurses/tinfo/captoinfo.c b/lib/libcurses/tinfo/captoinfo.c
index c36f7160660..6688647771c 100644
--- a/lib/libcurses/tinfo/captoinfo.c
+++ b/lib/libcurses/tinfo/captoinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: captoinfo.c,v 1.9 2001/01/22 18:01:50 millert Exp $ */
+/* $OpenBSD: captoinfo.c,v 1.10 2003/03/17 19:16:59 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
@@ -579,7 +579,7 @@ bcd_expression(const char *str)
{
char buffer[80];
int tst;
- sprintf(buffer, fmt, ch1, ch2);
+ snprintf(buffer, sizeof(buffer), fmt, ch1, ch2);
tst = strlen(buffer) - 1;
assert(len == tst);
}
@@ -601,7 +601,7 @@ save_tc_char(char *bufptr, int c1)
if (c1 == (c1 & 0x1f)) /* iscntrl() returns T on 255 */
(void) strcpy(temp, unctrl((chtype) c1));
else
- (void) sprintf(temp, "\\%03o", c1);
+ (void) snprintf(temp, sizeof(temp), "\\%03o", c1);
bufptr = save_string(bufptr, temp);
}
return bufptr;