From 6a860ee977eea7bfa065789ea4319ecab5af703c Mon Sep 17 00:00:00 2001 From: Mark Nudelman Date: Sun, 26 Sep 2021 07:55:47 -1000 Subject: [PATCH] Fix possible buffer overflow with large number of ridiculously large tabstops. --- optfunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optfunc.c b/optfunc.c index 7b098957..0ac8b890 100644 --- a/optfunc.c +++ b/optfunc.c @@ -723,7 +723,7 @@ opt_x(type, s) extern int tabstops[]; extern int ntabstops; extern int tabdefault; - char msg[60+(4*TABSTOP_MAX)]; + char msg[60+((INT_STRLEN_BOUND(int)+1)*TABSTOP_MAX)]; int i; PARG p;