htmlroff: fix array bounds

This commit is contained in:
Xiao-Yong Jin 2021-01-29 05:38:41 +00:00 committed by Dan Cross
parent 4e6bb208eb
commit 0144f87dc6

View file

@ -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;