From 1bf884494029484b848f0d3a04324cab50b93b28 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 18 Feb 2014 07:57:08 +0000 Subject: texk/devnag: More bug fix from Richard Koch git-svn-id: svn://tug.org/texlive/trunk@32996 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/devnag/ChangeLog | 6 ++++++ Build/source/texk/devnag/src/devnag.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/devnag/ChangeLog b/Build/source/texk/devnag/ChangeLog index 07336c9eb2f..0a3e00f3554 100644 --- a/Build/source/texk/devnag/ChangeLog +++ b/Build/source/texk/devnag/ChangeLog @@ -1,3 +1,9 @@ +2014-02-18 Peter Breitenlohner + + * src/devnag.c (dnproc): Bug fix: More strcpy() => memmove() + when src and dest overlap. + Reported by Richard Koch . + 2014-02-17 Peter Breitenlohner * src/devnag.c (dnproc): Bug fix: Replace strcpy() by memmove() diff --git a/Build/source/texk/devnag/src/devnag.c b/Build/source/texk/devnag/src/devnag.c index 4e48d7ab248..71ee0993d0b 100644 --- a/Build/source/texk/devnag/src/devnag.c +++ b/Build/source/texk/devnag/src/devnag.c @@ -2265,7 +2265,7 @@ void put_word(void) { if (do_hyphen) { /* hack */ do { w_ptr = strstr(word, "\\-\\qq{"); - if (w_ptr != NULL) strcpy(w_ptr, w_ptr+2); + if (w_ptr != NULL) memmove(w_ptr, w_ptr+2, strlen(w_ptr+2)+1); } while (w_ptr != NULL); } @@ -2499,7 +2499,7 @@ char find_dn(void) { } dn_ptr += 1; } - strcpy(inbuf, dn_ptr); + memmove(inbuf, dn_ptr, strlen(dn_ptr)+1); return(TRUE); } -- cgit v1.2.3