diff options
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/libdep_plugin.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c862e8b..e7620ce 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2021-04-13 Alan Modra <amodra@gmail.com> + + PR 27722 + * libdep_plugin.c (str2vec): Don't pass a potentially signed char + to isspace. + 2021-04-12 Alan Modra <amodra@gmail.com> * configure.ac (--enable-checking): Add support. diff --git a/ld/libdep_plugin.c b/ld/libdep_plugin.c index 7c108e4..5130c6f 100644 --- a/ld/libdep_plugin.c +++ b/ld/libdep_plugin.c @@ -139,7 +139,7 @@ str2vec (char *in) end = in + strlen (in); s = in; - while (isspace (*s)) s++; + while (isspace ((unsigned char) *s)) s++; first = s; i = 1; @@ -163,12 +163,12 @@ str2vec (char *in) memmove (s, s+1, end-s-1); end--; } - if (isspace (*s)) + if (isspace ((unsigned char) *s)) { if (sq || dq) continue; *s++ = '\0'; - while (isspace (*s)) s++; + while (isspace ((unsigned char) *s)) s++; if (*s) res[++i] = s; } |