diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-17 19:17:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-17 19:17:00 +0000 |
commit | 61bb647481e36bb3a55aa63edc3cc4fa18c8a2ea (patch) | |
tree | 78a315d556cccb6c1c26d54d9f1dbb0a3e3dad7a /lib/libcurses/tinfo/read_entry.c | |
parent | 5934993814e647644671dd601072bdd92890335a (diff) |
use snprintf throughout
Diffstat (limited to 'lib/libcurses/tinfo/read_entry.c')
-rw-r--r-- | lib/libcurses/tinfo/read_entry.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcurses/tinfo/read_entry.c b/lib/libcurses/tinfo/read_entry.c index 2d6f4ba4ba6..8c31ca39dd3 100644 --- a/lib/libcurses/tinfo/read_entry.c +++ b/lib/libcurses/tinfo/read_entry.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read_entry.c,v 1.12 2001/01/22 18:01:55 millert Exp $ */ +/* $OpenBSD: read_entry.c,v 1.13 2003/03/17 19:16:59 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * @@ -414,7 +414,7 @@ _nc_read_tic_entry(char *const filename, if (strlen(dir) > MAX_TPATH) return 0; - (void) sprintf(filename, "%s/%s", dir, ttn); + (void) snprintf(filename, MAX_TPATH + 1, "%s/%s", dir, ttn); return _nc_read_file_entry(filename, tp); } @@ -478,7 +478,7 @@ _nc_read_entry #endif /* __OpenBSD__ */ /* truncate the terminal name to prevent dangerous buffer airline */ - (void) sprintf(ttn, "%c/%.*s", *tn, MAX_ALIAS, tn); + (void) snprintf(ttn, sizeof(ttn), "%c/%.*s", *tn, MAX_ALIAS, tn); /* This is System V behavior, in conjunction with our requirements for * writing terminfo entries. |