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/cl | |
parent | 325437057bbda9490b174c8fc6dc8f0e14a8f145 (diff) |
Fix snprintf return value usage.
Diffstat (limited to 'usr.bin/vi/cl')
-rw-r--r-- | usr.bin/vi/cl/cl_term.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/vi/cl/cl_term.c b/usr.bin/vi/cl/cl_term.c index 6edaffb0bf4..a86b9924b00 100644 --- a/usr.bin/vi/cl/cl_term.c +++ b/usr.bin/vi/cl/cl_term.c @@ -221,6 +221,8 @@ cl_pfmap(sp, stype, from, flen, to, tlen) nlen = snprintf(keyname, sizeof(keyname), "function key %d", atoi(from + 1)); + if (nlen >= sizeof(keyname)) + nlen = sizeof(keyname) - 1; return (seq_set(sp, keyname, nlen, p, strlen(p), to, tlen, stype, SEQ_NOOVERWRITE | SEQ_SCREEN)); } |