From 44b56e49bc3ab4549fa264d079679c4441691afc Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 10 2020 06:47:09 +0000 Subject: tcsh-6.20.00-004-do-not-use-old-pointer-tricks.patch patch_name: tcsh-6.20.00-004-do-not-use-old-pointer-tricks.patch present_in_specfile: true location_in_specfile: 5 --- diff --git a/tw.init.c b/tw.init.c index 68adbb9..d9525c5 100644 --- a/tw.init.c +++ b/tw.init.c @@ -125,9 +125,8 @@ tw_str_add(stringlist_t *sl, size_t len) sl->buff = xrealloc(sl->buff, sl->tbuff * sizeof(Char)); /* Re-thread the new pointer list, if changed */ if (ptr != NULL && ptr != sl->buff) { - intptr_t offs = sl->buff - ptr; for (i = 0; i < sl->nlist; i++) - sl->list[i] += offs; + sl->list[i] = sl->buff + (sl->list[i] - ptr); } disabled_cleanup(&pintr_disabled); }