summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/xtouch.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/xtouch.c b/tests/xtouch.c
index e7c2e00..5d65a4c 100644
--- a/tests/xtouch.c
+++ b/tests/xtouch.c
@@ -217,11 +217,8 @@ int main(int argc, char *argv[]) {
}
if (marg) {
- char *end;
- long mode = strtol(marg, &end, 8);
- // https://github.com/llvm/llvm-project/issues/64946
- sanitize_init(&end);
- if (*marg && !*end && mode >= 0 && mode < 01000) {
+ long mode;
+ if (xstrtol(marg, NULL, 8, &mode) == 0 && mode >= 0 && mode < 01000) {
args.fmode = args.dmode = mode;
} else {
fprintf(stderr, "%s: Invalid mode '%s'\n", cmd, marg);