blob: a0f51d1bf6baf13c68ecd762a7d6e1de2c607dc7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-run-test262.c,v 1.1 2022/01/30 10:55:03 he Exp $
Don't trigger undefined behaviour with isxxxxx() macros.
--- run-test262.c.orig 2021-03-27 10:00:32.000000000 +0000
+++ run-test262.c
@@ -1635,7 +1635,7 @@ int run_test(const char *filename, int i
/* XXX: should extract the phase */
char *q = find_tag(p, "type:", &state);
if (q) {
- while (isspace(*q))
+ while (isspace((unsigned char)*q))
q++;
error_type = strdup_len(q, strcspn(q, " \n"));
}
@@ -2025,7 +2025,7 @@ int main(int argc, char **argv)
update_exclude_dirs();
if (is_dir_list) {
- if (optind < argc && !isdigit(argv[optind][0])) {
+ if (optind < argc && !isdigit((unsigned char)argv[optind][0])) {
filename = argv[optind++];
namelist_load(&test_list, filename);
}
|