]> git.eshelyaron.com Git - emacs.git/commit
Fix integer overflow when reading XPM
authorStefan Kangas <stefankangas@gmail.com>
Mon, 22 Jul 2024 16:23:01 +0000 (18:23 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 4 Sep 2024 07:51:56 +0000 (09:51 +0200)
commita599d64722a93fa27bad550a8ebf558bfd0cdfc7
treed95c3d7b94420661ee6915f66197dce52076f8c3
parent82e0d040722411b2bb4d4101287ff627cb3474d7
Fix integer overflow when reading XPM

* src/image.c (xpm_str_to_int): New function.
(xpm_load_image): Replace sscanf with strtol, to correctly handle
integer overflow when reading a malformed XPM file.  (Bug#72245)

(cherry picked from commit 73277a4097bb6c0d7c9ec1042f053584b28af1dd)
src/image.c