From a0241d014e3d762bc7818d6cd8fd7c90bab3c538 Mon Sep 17 00:00:00 2001 From: Kenichi Handa <handa@m17n.org> Date: Mon, 7 Nov 2011 10:57:07 +0900 Subject: Set members of the struct coding_system before accessing them (bug#9910,9911,9912). --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 5fd59d394d9..79908e9b29b 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1043,7 +1043,7 @@ coding_set_destination (struct coding_system *coding) { if (BUFFERP (coding->dst_object)) { - if (coding->src_pos < 0) + if (BUFFERP (coding->src_object) && coding->src_pos < 0) { coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE; coding->dst_bytes = (GAP_END_ADDR -- cgit v1.2.3