]> git.eshelyaron.com Git - emacs.git/commit
Fix insert-file-contents integer overflows
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Jul 2025 21:22:02 +0000 (14:22 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 08:48:45 +0000 (10:48 +0200)
commitbffd24a73685d091132763a6995536d396ddaa2a
treed4f489cbef4d2c49ba7bca973d55f83a2bae71a9
parent080cf96717b719d89c6675ec479a0139c658b8e8
Fix insert-file-contents integer overflows

* src/fileio.c (Finsert_file_contents): Change ‘total’ from
ptrdiff_t to off_t since it might not fit in ptrdiff_t.
Check for overflow when estimating the insertion size.

(cherry picked from commit 56091b6d5cccecf320796bd62e36adc64f45b614)
src/fileio.c