summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2015-10-03 14:21:48 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2015-10-03 14:50:50 +0200
commitb235ceaaf69345a5c79ec96ce0ca61b29fb232e1 (patch)
tree0b116e6b34ebbcf325e2a58e518260822d014faa /src/coding.c
parent272ca096356e30c67ce337855da7531994040255 (diff)
downloademacs-b235ceaaf69345a5c79ec96ce0ca61b29fb232e1.tar.gz
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)
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;