From: Paul Eggert Date: Tue, 28 Jul 2015 06:18:14 +0000 (-0700) Subject: Fix uninitalized value in encode_coding_object X-Git-Tag: emacs-25.0.90~1423 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f5dc3cf21cf6d6f51c096262225fcb96a8a7f126;p=emacs.git 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. --- 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)) {