tcmd/htmlroff: fix buffer overflow in t2.c getqarg - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit d9057521e665e1564e38b93ae1fafb53c81cb5d1
(DIR) parent 8cd46ae7bc031f311c833ad32445f5cde1916f99
(HTM) Author: Neven Sajko <nsajko@gmail.com>
Date: Sat, 28 Dec 2019 21:33:59 +0000
cmd/htmlroff: fix buffer overflow in t2.c getqarg
This is actually from 2016:
https://plan9port-review.googlesource.com/c/plan9/+/1590
Change-Id: I6f2a3d71a9dd589eff7ab15b3c1d3997254b3c35
Diffstat:
M src/cmd/htmlroff/t2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/htmlroff/t2.c b/src/cmd/htmlroff/t2.c
t@@ -26,7 +26,7 @@ getqarg(void)
Rune *p, *e;
p = buf;
- e = p+sizeof buf-1;
+ e = p + nelem(buf) - 1;
if(getrune() != '\'')
return nil;