]> git.eshelyaron.com Git - emacs.git/commit
Fix get_conversion_field --with-wide-wint overflow
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 14 Jul 2024 22:24:21 +0000 (23:24 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 17 Jul 2024 21:53:40 +0000 (23:53 +0200)
commitf96cd9a42f2ffa262a3ffd9a71bb87a9baabccec
treef23a10a5d76d85d583d5474c7ad49bcd58c1cb58
parent1f4307889a5853cc3b641549dd03243f24ddcb07
Fix get_conversion_field --with-wide-wint overflow

* src/textconv.c (get_conversion_field): Set max value to
PTRDIFF_MAX, not MOST_POSITIVE_FIXNUM, since the variable is
ptrdiff_t, not EMACS_INT.  Problem caught by gcc -Woverflow on a
32-bit platform with --with-wide-int.

(cherry picked from commit b4050ab75e896dd0df51624c956e0dd412dde2cc)
src/textconv.c