From 3d1cdf4106fb107757898c92e55e928d35c02af9 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Fri, 2 Apr 1999 06:19:33 +0000 Subject: * Fix possible memory stomp. * A few admin file cleanups. --- job.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'job.c') diff --git a/job.c b/job.c index 5999558..19f386b 100644 --- a/job.c +++ b/job.c @@ -2014,7 +2014,10 @@ construct_command_argv_internal (line, restp, shell, ifs, batch_filename_ptr) since it was most likely used to line up the continued line with the previous one. */ if (*p == '\t') - strcpy (p, p + 1); + /* Note these overlap and strcpy() is undefined for + overlapping objects in ANSI C. The strlen() _IS_ right, + since we need to copy the nul byte too. */ + bcopy (p + 1, p, strlen(p)); if (instring) goto string_char; -- cgit v1.2.3