aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEivind Eklund <eivind@FreeBSD.org>1997-12-12 18:11:29 +0000
committerEivind Eklund <eivind@FreeBSD.org>1997-12-12 18:11:29 +0000
commitca8f21d65c516e06b8bc96de3da789f082983387 (patch)
treed3b88834c67c5ddf4ba98f19c0674d8de67dc257 /bin
parent760cf7b24a120c88f546e619048283ffcf038e4a (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/stty/print.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/stty/print.c b/bin/stty/print.c
index 339a203b045d..21eb853e5501 100644
--- a/bin/stty/print.c
+++ b/bin/stty/print.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: print.c,v 1.8 1997/02/22 14:05:53 peter Exp $
*/
#ifndef lint
@@ -205,8 +205,10 @@ print(tp, wp, ldisc, fmt)
if (fmt != BSD && cc[p->sub] == p->def)
continue;
#define WD "%-8s"
- (void)sprintf(buf1 + cnt * 8, WD, p->name);
- (void)sprintf(buf2 + cnt * 8, WD, ccval(p, cc[p->sub]));
+ (void)snprintf(buf1 + cnt * 8, sizeof(buf1) - cnt * 8,
+ WD, p->name);
+ (void)snprintf(buf2 + cnt * 8, sizeof(buf2) - cnt * 8,
+ WD, ccval(p, cc[p->sub]));
if (++cnt == LINELENGTH / 8) {
cnt = 0;
(void)printf("%s\n", buf1);