diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
commit | cd64a50f546ecbfd25035373ee745bd04e4e5905 (patch) | |
tree | 86a1452cec538b8f5259a45745e95cd1161d04e7 /usr.bin/less/charset.c | |
parent | 6153e3b8d9aedd43b1300c4d60217039c9485e02 (diff) |
lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu
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); } |