diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/exec.c | 2 | ||||
-rw-r--r-- | Src/prompt.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 80a7f4657..434db5ab9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2022-04-12 Peter Stephenson <p.stephenson@samsung.com> + + * 50049: Src/exec.c, Src/prompt.c: care with signed character + indices on the few remaining systems such as Cygwin that aren't + otherwise protected. + 2022-04-20 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> * 50081: Src/pattern.c, Src/params.c: reset global mbstate_t diff --git a/Src/exec.c b/Src/exec.c index 27d49e005..47753da48 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -561,7 +561,7 @@ zexecve(char *pth, char **argv, char **newenvp) isbinary = 1; hasletter = 0; for (ptr = execvebuf; ptr < ptr2; ptr++) { - if (islower(*ptr) || *ptr == '$' || *ptr == '`') + if (islower(STOUC(*ptr)) || *ptr == '$' || *ptr == '`') hasletter = 1; if (hasletter && *ptr == '\n') { isbinary = 0; diff --git a/Src/prompt.c b/Src/prompt.c index 738c7fc7a..092de63a4 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -1666,7 +1666,7 @@ match_colour(const char **teststrp, int is_fg, int colour) tc = TCBGCOLOUR; } if (teststrp) { - if (**teststrp == '#' && isxdigit((*teststrp)[1])) { + if (**teststrp == '#' && isxdigit(STOUC((*teststrp)[1]))) { struct color_rgb color; char *end; zlong col = zstrtol(*teststrp+1, &end, 16); |