diff options
Diffstat (limited to 'usr.bin/less/charset.c')
-rw-r--r-- | usr.bin/less/charset.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/less/charset.c b/usr.bin/less/charset.c index 04b4f83ed4a..979435e283b 100644 --- a/usr.bin/less/charset.c +++ b/usr.bin/less/charset.c @@ -1,4 +1,4 @@ -/* $OpenBSD: charset.c,v 1.3 2001/11/19 19:02:14 mpech Exp $ */ +/* $OpenBSD: charset.c,v 1.4 2003/03/13 09:09:32 deraadt Exp $ */ /* * Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman @@ -278,12 +278,12 @@ prchar(c) c &= 0377; if (!control_char(c)) - sprintf(buf, "%c", c); + snprintf(buf, sizeof buf, "%c", c); else if (c == ESC) - sprintf(buf, "ESC"); + snprintf(buf, sizeof buf, "ESC"); else if (c < 128 && !control_char(c ^ 0100)) - sprintf(buf, "^%c", c ^ 0100); + snprintf(buf, sizeof buf, "^%c", c ^ 0100); else - sprintf(buf, binfmt, c); + snprintf(buf, sizeof buf, binfmt, c); return (buf); } |