mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
50049: care with signed characters
Some signed-to-unsigned casts needed for a couple of cases of pointers used as indices.
This commit is contained in:
parent
09ad15b986
commit
c5a891a29d
3 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue