diff --git a/src/filelock.c b/src/filelock.c index 01d35c46726..e5b352cb6ff 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -419,7 +419,9 @@ current_lock_owner (lock_info_type *owner, Lisp_Object lfname) boot += 2; FALLTHROUGH; case ':': - if (! c_isdigit (boot[0])) + if (!(c_isdigit (boot[0]) + /* A negative number. */ + || (boot[0] == '-' && c_isdigit (boot[1])))) return EINVAL; boot_time = strtoimax (boot, &lfinfo_end, 10); break;