aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorAndreas Schwab2015-10-03 14:21:48 +0200
committerAndreas Schwab2015-10-03 14:50:50 +0200
commitb235ceaaf69345a5c79ec96ce0ca61b29fb232e1 (patch)
tree0b116e6b34ebbcf325e2a58e518260822d014faa /src/coding.c
parent272ca096356e30c67ce337855da7531994040255 (diff)
downloademacs-b235ceaaf69345a5c79ec96ce0ca61b29fb232e1.tar.gz
emacs-b235ceaaf69345a5c79ec96ce0ca61b29fb232e1.zip
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.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index d2655310cd3..31bffeab5c9 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -6004,7 +6004,8 @@ coding_inherit_eol_type (Lisp_Object coding_system, Lisp_Object parent)
6004 6004
6005 if (NILP (coding_system)) 6005 if (NILP (coding_system))
6006 coding_system = Qraw_text; 6006 coding_system = Qraw_text;
6007 CHECK_CODING_SYSTEM (coding_system); 6007 else
6008 CHECK_CODING_SYSTEM (coding_system);
6008 spec = CODING_SYSTEM_SPEC (coding_system); 6009 spec = CODING_SYSTEM_SPEC (coding_system);
6009 eol_type = AREF (spec, 2); 6010 eol_type = AREF (spec, 2);
6010 if (VECTORP (eol_type)) 6011 if (VECTORP (eol_type))
@@ -6051,6 +6052,7 @@ complement_process_encoding_system (Lisp_Object coding_system)
6051 coding_system = CDR_SAFE (Vdefault_process_coding_system); 6052 coding_system = CDR_SAFE (Vdefault_process_coding_system);
6052 else if (i == 2) 6053 else if (i == 2)
6053 coding_system = preferred_coding_system (); 6054 coding_system = preferred_coding_system ();
6055 CHECK_CODING_SYSTEM (coding_system);
6054 spec = CODING_SYSTEM_SPEC (coding_system); 6056 spec = CODING_SYSTEM_SPEC (coding_system);
6055 if (NILP (spec)) 6057 if (NILP (spec))
6056 continue; 6058 continue;