summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-12-26 11:25:32 +0000
committerLaurent Bercot <ska@appnovation.com>2023-12-26 11:25:32 +0000
commitdb852ecd93afc9f893886a132ee58b23579fc79d (patch)
tree6606dd37560c9337d17c253d9b750a5df3f9fe73 /src
parent97f9453b524d8163288230d545c1d9d0c284ca5e (diff)
downloadexecline-db852ecd93afc9f893886a132ee58b23579fc79d.tar.xz
Prepare for 2.9.4.1; fix some stack smashing
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/execline/case.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/execline/case.c b/src/execline/case.c
index b62583c..f1a71c6 100644
--- a/src/execline/case.c
+++ b/src/execline/case.c
@@ -21,7 +21,7 @@ static void case_execit (char const *const *argv, char const *expr, char const *
if (n)
{
size_t exprlen = strlen(expr) ;
- size_t fmtlen = exprlen + 6 ;
+ size_t fmtlen = exprlen + 6 + uint_fmt(0, n-1) ;
for (size_t i = 1 ; i < n ; i++)
fmtlen += uint_fmt(0, i) + 2 + pmatch[i].rm_eo - pmatch[i].rm_so ;
{