diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-05-16 14:09:21 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-05-16 14:09:21 +0000 |
commit | 9b1f710b8e4ade81fd57da97c460257a9b98c953 (patch) | |
tree | 5a050442635f7290ae1232d0f1bbb3af5753e146 /src | |
parent | b3660dd4cddaa7a3a935f04d3d5a6569a8768a54 (diff) | |
download | execline-9b1f710b8e4ade81fd57da97c460257a9b98c953.tar.xz |
bugfix: el_substitute could incorrectly share stralloc pointers
Diffstat (limited to 'src')
-rw-r--r-- | src/libexecline/el_substitute.c | 2 |
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) |