From f167df2e15cf4f787bf7d66068fd38a330d92d15 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 6 Apr 2003 21:12:08 +0000 Subject: The last commit incorporated an incomplete change of mine. --- usr.bin/tic/dump_entry.c | 7 +++---- 1 file 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 == ':') { -- cgit v1.2.3