From b970ef6ef50dc4e21a053ae673fe89fff5a3c52f Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Wed, 21 Oct 2015 15:13:45 -0700 Subject: unposted: strdup should be ztrdup --- ChangeLog | 2 ++ Src/math.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e40242eb8..e383ab9b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2015-10-21 Barton E. Schaefer + * unposted: Src/math.c: strdup should be ztrdup + * 36909: Src/hist.c: in getargs(), sanity-check the offsets for start and end of the requested words, in case of overflow diff --git a/Src/math.c b/Src/math.c index 56565a629..eee21e146 100644 --- a/Src/math.c +++ b/Src/math.c @@ -535,7 +535,7 @@ lexconstant(void) for (ptr2 = ptr; ptr2 < nptr; ptr2++) { if (*ptr2 == '_') { int len = nptr - ptr; - ptr = strdup(ptr); + ptr = ztrdup(ptr); for (ptr2 = ptr; len; len--) { if (*ptr2 == '_') chuck(ptr2); -- cgit 1.4.1