bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/8] Fix assignment of read-only location error on OS/2


From: KO Myung-Hun
Subject: [PATCH 3/8] Fix assignment of read-only location error on OS/2
Date: Sun, 20 Nov 2022 23:42:52 +0900

* src/job.c (construct_command_argv_internal) [__EMX__]: Use a buffer
allocated in a stack.
---
 src/job.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/job.c b/src/job.c
index b78f279c..aa848f0e 100644
--- a/src/job.c
+++ b/src/job.c
@@ -3226,7 +3226,11 @@ construct_command_argv_internal (char *line, char 
**restp, const char *shell,
 
 # ifdef __EMX__ /* is this necessary? */
     if (!unixy_shell && shellflags)
-      shellflags[0] = '/'; /* "/c" */
+      {
+        char *shflags = strdupa (shellflags);
+        shflags[0] = '/'; /* "/c" */
+        shellflags = shflags;
+      }
 # endif
 
     /* In .ONESHELL mode we are allowed to throw the entire current
-- 
2.30.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]