From 1f5dbf34c758de48611db1e16a286d51f4a316a5 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 9 Mar 1999 11:55:12 +0000 Subject: [PATCH] (setup_coding_system): Check for CODING_SYSTEM = nil. --- src/coding.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/coding.c b/src/coding.c index a31e3ea8bce..cf6bab223bb 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2851,7 +2851,12 @@ setup_coding_system (coding_system, coding) coding->mode = 0; coding->heading_ascii = -1; coding->post_read_conversion = coding->pre_write_conversion = Qnil; + + if (NILP (coding_system)) + goto label_invalid_coding_system; + coding_spec = Fget (coding_system, Qcoding_system); + if (!VECTORP (coding_spec) || XVECTOR (coding_spec)->size != 5 || !CONSP (XVECTOR (coding_spec)->contents[3])) -- 2.39.2