]> git.eshelyaron.com Git - emacs.git/commit
Fix unlikely lock file integer overflow
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Aug 2024 18:29:16 +0000 (11:29 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 16 Aug 2024 14:04:38 +0000 (16:04 +0200)
commitfbc7562de440d8d8474caa9dd4420cd563ca7750
treedca58054e4d65cf38d89bd8d721f6022609a8391
parentc8fa6e9daf079b02a495f62ad1de64339903b42d
Fix unlikely lock file integer overflow

* src/filelock.c (within_one_second): Accept intmax_t first arg.
Avoid undefined behavior on integer overflow.
(current_lock_owner): Simplify based on within_one_second change.

(cherry picked from commit cbacdca9e3f6dcf9b88704391f06daf7301608b0)
src/filelock.c