mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 19:37:58 +00:00
* coding.c (Ffind_operation_coding_system): Avoid subscript error.
This commit is contained in:
parent
eee1346555
commit
7b09a37a89
2 changed files with 2 additions and 1 deletions
|
|
@ -172,6 +172,7 @@
|
|||
Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
|
||||
(consume_chars): Rewrite to avoid calculating an address outside buffer.
|
||||
(Ffind_operation_coding_system): NATNUMP can eval its arg twice.
|
||||
Don't access memory outside of the args array.
|
||||
(Fdefine_coding_system_internal): Check for charset-id overflow.
|
||||
(ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
|
||||
result of ENCODE_CHAR.
|
||||
|
|
|
|||
|
|
@ -9291,7 +9291,7 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
|
|||
if (!SYMBOLP (operation)
|
||||
|| (target_idx = Fget (operation, Qtarget_idx), !NATNUMP (target_idx)))
|
||||
error ("Invalid first argument");
|
||||
if (nargs < 1 + XFASTINT (target_idx))
|
||||
if (nargs <= 1 + XFASTINT (target_idx))
|
||||
error ("Too few arguments for operation `%s'",
|
||||
SDATA (SYMBOL_NAME (operation)));
|
||||
target = args[XFASTINT (target_idx) + 1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue