* bug#74555: fix not checking if fixnat in Fmap_charset_chars
@ 2024-11-27 9:41 altermo31 via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 10:56 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: altermo31 via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-27 9:41 UTC (permalink / raw)
To: 74555
[-- Attachment #1.1: Type: text/plain, Size: 162 bytes --]
Problem:
Fmap_charset_chars's arguments from_code and to_code may be converted to unsigned numbers even if they're not fixnat.
Sulution:
Check that their fixnat.
[-- Attachment #1.2: Type: text/html, Size: 827 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-not-checking-if-fixnat.patch --]
[-- Type: text/x-patch; name=0001-Fix-not-checking-if-fixnat.patch, Size: 896 bytes --]
From 8d036862b48d57a5a848f1c0ebd4fd6c613539ca Mon Sep 17 00:00:00 2001
From: altermo <107814000+altermo@users.noreply.github.com>
Date: Wed, 27 Nov 2024 10:37:28 +0100
Subject: [PATCH] Fix not checking if fixnat
---
src/charset.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/charset.c b/src/charset.c
index f7d80cc..37d08f2 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -819,6 +819,7 @@ TO-CODE, which are CHARSET code points. */)
from = CHARSET_MIN_CODE (cs);
else
{
+ CHECK_FIXNAT(from_code);
from = XFIXNUM (from_code);
if (from < CHARSET_MIN_CODE (cs))
from = CHARSET_MIN_CODE (cs);
@@ -827,6 +828,7 @@ TO-CODE, which are CHARSET code points. */)
to = CHARSET_MAX_CODE (cs);
else
{
+ CHECK_FIXNAT(to_code);
to = XFIXNUM (to_code);
if (to > CHARSET_MAX_CODE (cs))
to = CHARSET_MAX_CODE (cs);
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#74555: fix not checking if fixnat in Fmap_charset_chars
2024-11-27 9:41 bug#74555: fix not checking if fixnat in Fmap_charset_chars altermo31 via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-30 10:56 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-11-30 10:56 UTC (permalink / raw)
To: altermo31; +Cc: 74555-done
> Date: Wed, 27 Nov 2024 09:41:48 +0000
> From: altermo31 via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Problem:
> Fmap_charset_chars's arguments from_code and to_code may be converted to unsigned numbers even if
> they're not fixnat.
>
> Sulution:
> Check that their fixnat.
Thanks, installed on the master branch, and closing the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-30 10:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 9:41 bug#74555: fix not checking if fixnat in Fmap_charset_chars altermo31 via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-30 10:56 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).