1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 19:31:02 -08:00

More validatation of coding systems

* src/fileio.c (Finsert_file_contents): Remove redundant
coding-system check.
(choose_write_coding_system): Likewise.
* src/coding.c (complement_process_encoding_system): Check
argument for valid coding system.
This commit is contained in:
Andreas Schwab 2015-10-03 14:21:48 +02:00
parent 272ca09635
commit b235ceaaf6
2 changed files with 9 additions and 19 deletions

View file

@ -6004,7 +6004,8 @@ coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent)
if (NILP (coding_system))
coding_system = Qraw_text;
CHECK_CODING_SYSTEM (coding_system);
else
CHECK_CODING_SYSTEM (coding_system);
spec = CODING_SYSTEM_SPEC (coding_system);
eol_type = AREF (spec, 2);
if (VECTORP (eol_type))
@ -6051,6 +6052,7 @@ complement_process_encoding_system (Lisp_Object coding_system)
coding_system = CDR_SAFE (Vdefault_process_coding_system);
else if (i == 2)
coding_system = preferred_coding_system ();
CHECK_CODING_SYSTEM (coding_system);
spec = CODING_SYSTEM_SPEC (coding_system);
if (NILP (spec))
continue;