From 9b1f710b8e4ade81fd57da97c460257a9b98c953 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 16 May 2020 14:09:21 +0000 Subject: bugfix: el_substitute could incorrectly share stralloc pointers --- src/libexecline/el_substitute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3