From 2a9efb5e24125fa0fa7368fcedde75c18b0fab6e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 15 Oct 2016 10:32:11 -0700 Subject: Fix wrong memset in new args handling function. * args.c (args_cat_zap_from): Clear the area that was copied, starting at the index offset, rather than from argument zero. This bug could result in spurious retention due to failing to zap some arguments. --- args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/args.c b/args.c index 9377d357..b2159b38 100644 --- a/args.c +++ b/args.c @@ -103,7 +103,7 @@ struct args *args_cat_zap_from(struct args *to, struct args *from, cnum index) to->list = from->list; memcpy(to->arg + to->fill, from->arg + index, size); to->fill += from->fill - index; - memset(from->arg, 0, size); + memset(from->arg + index, 0, size); return to; } -- cgit v1.2.3