about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-05-16 14:09:21 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-05-16 14:09:21 +0000
commit9b1f710b8e4ade81fd57da97c460257a9b98c953 (patch)
tree5a050442635f7290ae1232d0f1bbb3af5753e146
parentb3660dd4cddaa7a3a935f04d3d5a6569a8768a54 (diff)
downloadexecline-9b1f710b8e4ade81fd57da97c460257a9b98c953.tar.gz
execline-9b1f710b8e4ade81fd57da97c460257a9b98c953.tar.xz
execline-9b1f710b8e4ade81fd57da97c460257a9b98c953.zip
bugfix: el_substitute could incorrectly share stralloc pointers
-rw-r--r--AUTHORS1
-rw-r--r--NEWS6
-rw-r--r--doc/index.html2
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/info2
-rw-r--r--src/libexecline/el_substitute.c2
6 files changed, 16 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index c1cec1a..7ffc516 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -23,3 +23,4 @@ Thanks to:
   Danilo Spinella <danyspin97@protonmail.com>
   Éric Vidal <eric@obarun.org
   Samuel Holland <samuel@sholland.org>
+  Profpatsch <mail@profpatsch.de>
diff --git a/NEWS b/NEWS
index 353fd51..d966ede 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
 Changelog for execline.
 
+In 2.6.0.2
+----------
+
+ - Bugfixes.
+
+
 In 2.6.0.1
 ----------
 
diff --git a/doc/index.html b/doc/index.html
index bc02088..0b41cea 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -66,7 +66,7 @@ library. </li>
 <h3> Download </h3>
 
 <ul>
- <li> The current released version of execline is <a href="execline-2.6.0.1.tar.gz">2.6.0.1</a>. </li>
+ <li> The current released version of execline is <a href="execline-2.6.0.2.tar.gz">2.6.0.2</a>. </li>
  <li> Alternatively, you can checkout a copy of the
 <a href="//git.skarnet.org/cgi-bin/cgit.cgi/execline/">execline
 git repository</a>:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 5cd11cc..e1ae3a3 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,12 @@
 
 <h1> What has changed in execline </h1>
 
+<h2> in 2.6.0.2 </h2>
+
+<ul>
+ <li> No functional changes </li>
+</ul>
+
 <h2> in 2.6.0.1 </h2>
 
 <ul>
diff --git a/package/info b/package/info
index 9c34156..22fb0b7 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
 package=execline
-version=2.6.0.1
+version=2.6.0.2
 category=admin
 package_macro_name=EXECLINE
diff --git a/src/libexecline/el_substitute.c b/src/libexecline/el_substitute.c
index 5eff6d3..9a337fe 100644
--- a/src/libexecline/el_substitute.c
+++ b/src/libexecline/el_substitute.c
@@ -152,7 +152,7 @@ int el_substitute (stralloc *dst, char const *src, size_t len, char const *vars,
   int nc = 0 ;
   int wasnull = !dst->s ;
 
-  info.dst = *dst ;
+  if (!stralloc_copy(&info.dst, dst)) return -1 ;
   info.values = values ;
 
   while (i < len)