From f5dc3cf21cf6d6f51c096262225fcb96a8a7f126 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 27 Jul 2015 23:18:14 -0700 Subject: [PATCH] Fix uninitalized value in encode_coding_object * src/coding.c (encode_coding_object): Also initialize coding->src_pos and coding->src_pos_byte when NILP (src_object). This avoids later use of uninitialized storage. --- src/coding.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coding.c b/src/coding.c index 9d1ebc8a4cb..1887560827c 100644 --- a/src/coding.c +++ b/src/coding.c @@ -8301,7 +8301,11 @@ encode_coding_object (struct coding_system *coding, } } else - code_conversion_save (0, 0); + { + code_conversion_save (0, 0); + coding->src_pos = from; + coding->src_pos_byte = from_byte; + } if (BUFFERP (dst_object)) { -- 2.39.2