[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
- [PATCH 0/8] Fix compilation on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 1/8] Update README.OS2, KO Myung-Hun, 2022/11/20
- [PATCH 3/8] Fix assignment of read-only location error on OS/2,
KO Myung-Hun <=
- [PATCH 4/8] Fix [-Werror=unused-variable] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 2/8] Define a HAVE___STRCHRNUL macro properly, KO Myung-Hun, 2022/11/20
- [PATCH 5/8] Fix [-Werror=discarded-qualifiers] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 6/8] Fix [-Werror=incompatible-pointer-types] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 7/8] Fix [-Werror=shadow] on OS/2, KO Myung-Hun, 2022/11/20
- [PATCH 8/8] Fix [-Werror=dangling-else] on OS/2, KO Myung-Hun, 2022/11/20