diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 23:38:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-06 23:38:08 +0000 |
commit | 383f1657fdcb5d52c634d04443552ab76265e2b9 (patch) | |
tree | 49e3a7384ed6878d539a59d9b6eebaeef30cee62 /usr.bin/less/line.c | |
parent | e466210857f6bd5671996750e83497c28c1d5485 (diff) |
more strlcpy/strlcat/snprintf, less strcpy/strcat/sprintf
reviewed by tdeval, millert, dhartmei and others. more bits coming here
from some of them i think
Diffstat (limited to 'usr.bin/less/line.c')
-rw-r--r-- | usr.bin/less/line.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/line.c b/usr.bin/less/line.c index 365a31d5d89..bc143fca982 100644 --- a/usr.bin/less/line.c +++ b/usr.bin/less/line.c @@ -1,4 +1,4 @@ -/* $OpenBSD: line.c,v 1.3 2001/11/19 19:02:14 mpech Exp $ */ +/* $OpenBSD: line.c,v 1.4 2003/04/06 23:38:07 deraadt Exp $ */ /* * Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman @@ -103,7 +103,7 @@ plinenum(pos) */ lno = find_linenum(pos); - sprintf(&linebuf[curr], "%6d", lno); + snprintf(&linebuf[curr], sizeof linebuf - curr, "%6d", lno); n = strlen(&linebuf[curr]); column += n; for (i = 0; i < n; i++) |