[PATCH 4/4] restorecond: fix isspace() call to cast to unsigned
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <[email protected]> |
isspace() on a plain char argument is defined for negative values; cast to unsigned char in the caller. Signed-off-by: Stephen Smalley <[email protected]> --- restorecond/watch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restorecond/watch.c b/restorecond/watch.c index 18bd90db..4e3c382f 100644 --- a/restorecond/watch.c +++ b/restorecond/watch.c @@ -424,7 +424,7 @@ static void process_config(int fd, FILE *cfg) while (getline(&line_buf, &len, cfg) > 0) { char *buffer = line_buf; - while (isspace(*buffer)) + while (isspace((unsigned char)*buffer)) buffer++; if (buffer[0] == '#') continue; -- 2.55.0