plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 0144f87dc6c7f2f6becbd55519e433a9b36a466f
parent 4e6bb208eb96baae65fd6b1bf99aaa1115b9a9ba
Author: Xiao-Yong Jin <xjin@anl.gov>
Date:   Fri, 29 Jan 2021 05:38:41 +0000

htmlroff: fix array bounds

Diffstat:
Msrc/cmd/htmlroff/roff.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cmd/htmlroff/roff.c b/src/cmd/htmlroff/roff.c @@ -257,7 +257,7 @@ copyarg(void) int c; Rune *r; - if(_readx(buf, sizeof buf, ArgMode, 0) < 0) + if(_readx(buf, MaxLine, ArgMode, 0) < 0) return nil; r = runestrstr(buf, L("\\\"")); if(r){ @@ -280,7 +280,7 @@ readline(int m) static Rune buf[MaxLine]; Rune *r; - if(_readx(buf, sizeof buf, m, 1) < 0) + if(_readx(buf, MaxLine, m, 1) < 0) return nil; r = erunestrdup(buf); return r;