summaryrefslogtreecommitdiff
path: root/src
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 /src
parentb3660dd4cddaa7a3a935f04d3d5a6569a8768a54 (diff)
downloadexecline-9b1f710b8e4ade81fd57da97c460257a9b98c953.tar.xz
bugfix: el_substitute could incorrectly share stralloc pointers
Diffstat (limited to 'src')
-rw-r--r--src/libexecline/el_substitute.c2
1 files changed, 1 insertions, 1 deletions
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)