summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-04-06 21:12:07 +0000
committermillert <millert@openbsd.org>2003-04-06 21:12:07 +0000
commit1128338c4d29683f53e3d9e62e1cb0e15fc70447 (patch)
tree3721f4957b8cfb1cff982341f4857ecd5f2c597c
parentstrlcpy; ok millert (diff)
downloadwireguard-openbsd-1128338c4d29683f53e3d9e62e1cb0e15fc70447.tar.xz
wireguard-openbsd-1128338c4d29683f53e3d9e62e1cb0e15fc70447.zip
The last commit incorporated an incomplete change of mine.
-rw-r--r--usr.bin/tic/dump_entry.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tic/dump_entry.c b/usr.bin/tic/dump_entry.c
index 753e6c8ac8f..923a2953d8b 100644
--- a/usr.bin/tic/dump_entry.c
+++ b/usr.bin/tic/dump_entry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump_entry.c,v 1.17 2003/04/06 18:38:42 deraadt Exp $ */
+/* $OpenBSD: dump_entry.c,v 1.18 2003/04/06 21:12:07 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998-2000 Free Software Foundation, Inc. *
@@ -655,9 +655,8 @@ fmt_entry(TERMTYPE * tterm,
} else if (suppress_untranslatable) {
continue;
} else {
- char *s = srccap, *d = buffer;
- snprintf(buffer, buffer + sizeof buffer - d, "..%s=",
- name);
+ char *d, *s = srccap;
+ snprintf(buffer, sizeof buffer, "..%s=", name);
d = buffer + strlen(buffer);
while ((*d = *s++) != 0) { /* XXX overflow? */
if (*d == ':') {