Add more error-checking to Fmap_charset_chars
* src/charset.c (Fmap_charset_chars): Signal an error if FROM_CODE or TO_CODE is non-nil and not a fixnum. (Bug#74555) Copyright-paperwork-exempt: yes
This commit is contained in:
parent
8ef44ca64e
commit
2125e188ad
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue