From: Eli Zaretskii <eliz@gnu.org>
To: altermo31 <altermo31@proton.me>
Cc: 73985@debbugs.gnu.org
Subject: bug#73985: fix: charset.max_char may be used before being set
Date: Thu, 24 Oct 2024 17:12:13 +0300 [thread overview]
Message-ID: <86plnpd1z6.fsf@gnu.org> (raw)
In-Reply-To: <xi8D9sUHNCuanOf5f9EK47MmgqcicM3hPjmS-vT6As7R2NQNKFIgBRxQpmRg_Ar8HPwaYqMrwjRf611ogPg3-55ksjhU-6L-BDPjF7Xhmi0=@proton.me> (bug-gnu-emacs@gnu.org)
> Date: Thu, 24 Oct 2024 11:46:17 +0000
> From: altermo31 via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Problem:
> If the value to be set to charset.max_char is invalid, an error occurs, but the error uses the yet unset charset.max_char.
>
> Solution:
> Use the value that charset.max_char would be set to if the value wasn't invalid.
Thanks. You are right that the original code is incorrect, but the
code you propose has a subtle problem: the sum
i + charset.code_offset
could overflow. So we need to find a safer way of explaining the
problem.
next prev parent reply other threads:[~2024-10-24 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 11:46 bug#73985: fix: charset.max_char may be used before being set altermo31 via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-24 14:12 ` Eli Zaretskii [this message]
2024-10-24 14:42 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86plnpd1z6.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73985@debbugs.gnu.org \
--cc=altermo31@proton.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).