From 167eeccde389ea3a9611aed611179c729d719460 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Tue, 16 Apr 2024 16:03:54 +0000
Subject: Fix off-by-one in backtick; prepare for 2.9.5.1
Signed-off-by: Laurent Bercot
---
NEWS | 6 ++++++
doc/index.html | 4 ++--
doc/upgrade.html | 6 ++++++
package/info | 2 +-
src/execline/backtick.c | 1 +
src/libexecline/el_modifs_and_exec.c | 2 +-
6 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/NEWS b/NEWS
index 328c2d4..696b7f0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for execline.
+In 2.9.5.1
+----------
+
+ - Bugfixes.
+
+
In 2.9.5.0
----------
diff --git a/doc/index.html b/doc/index.html
index 73b7867..74f83f3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -61,7 +61,7 @@ library.
- - If you're using musl and
+
- If you're using musl and
want nsswitch-like functionality:
nsss version
0.2.0.4 or later (build-time and boot-time)
@@ -77,7 +77,7 @@ want nsswitch-like functionality:
Download
- - The current released version of execline is 2.9.5.0.
+ - The current released version of execline is 2.9.5.1.
- Alternatively, you can checkout a copy of the
execline
git repository:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index b34a6fc..927db65 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,12 @@
What has changed in execline
+ in 2.9.5.1
+
+
+ - No functional changes.
+
+
in 2.9.5.0
diff --git a/package/info b/package/info
index 6815b32..dc71495 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=execline
-version=2.9.5.0
+version=2.9.5.1
category=admin
package_macro_name=EXECLINE
diff --git a/src/execline/backtick.c b/src/execline/backtick.c
index e4a543b..5625921 100644
--- a/src/execline/backtick.c
+++ b/src/execline/backtick.c
@@ -53,6 +53,7 @@ int main (int argc, char const **argv, char const *const *envp)
argc1 = el_semicolon(argv) ;
if (!argc1) strerr_dief1x(100, "empty block") ;
if (argc1 >= argc) strerr_dief1x(100, "unterminated block") ;
+ if (argc1 + 1 == argc) strerr_dief1x(100, "the command line after the block must not be empty") ;
argv[argc1] = 0 ;
{
diff --git a/src/libexecline/el_modifs_and_exec.c b/src/libexecline/el_modifs_and_exec.c
index fe0117c..ca72291 100644
--- a/src/libexecline/el_modifs_and_exec.c
+++ b/src/libexecline/el_modifs_and_exec.c
@@ -21,7 +21,7 @@ void el_modifs_and_exec (char const *const *argv, char const *const *vars, char
if (values[i])
{
yesn++ ;
- yeslen += len ;
+ yeslen += len + 1 ;
modiflen += 1 + strlen(values[i]) ;
}
}
--
cgit 1.4.1