diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-23 22:40:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-23 22:40:56 +0000 |
commit | 30cb72a00b8cc59895c391cad0f8e31611611ec4 (patch) | |
tree | 3e2f67dd80af3489363cf0596b740c6533994e40 /usr.bin/vi/ex/ex_visual.c | |
parent | 325437057bbda9490b174c8fc6dc8f0e14a8f145 (diff) |
Fix snprintf return value usage.
Diffstat (limited to 'usr.bin/vi/ex/ex_visual.c')
-rw-r--r-- | usr.bin/vi/ex/ex_visual.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/vi/ex/ex_visual.c b/usr.bin/vi/ex/ex_visual.c index 82e503d4465..c181f7709f4 100644 --- a/usr.bin/vi/ex/ex_visual.c +++ b/usr.bin/vi/ex/ex_visual.c @@ -84,6 +84,8 @@ ex_visual(sp, cmdp) "%luz%c%lu", sp->lno, pos, cmdp->count); else len = snprintf(buf, sizeof(buf), "%luz%c", sp->lno, pos); + if (len >= sizeof(buf)) + len = sizeof(buf) - 1; (void)v_event_push(sp, NULL, buf, len, CH_NOMAP | CH_QUOTED); /* |