diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-15 10:32:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-15 10:32:11 -0700 |
commit | fa2c289ed664ec55de0f5a453ef65e27d13a51e0 (patch) | |
tree | 9de807510cf1edd37c1238b27028ced0b4355972 | |
parent | 8b7a8b346d02f7c81b6078ea61fc545df55b0dc8 (diff) | |
download | txr-fa2c289ed664ec55de0f5a453ef65e27d13a51e0.tar.gz txr-fa2c289ed664ec55de0f5a453ef65e27d13a51e0.tar.bz2 txr-fa2c289ed664ec55de0f5a453ef65e27d13a51e0.zip |
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.
-rw-r--r-- | args.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |