* coding.c (encode_designation_at_bol): Don't use uninitialized
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Dec 2011 09:05:10 +0000 (01:05 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Dec 2011 09:05:10 +0000 (01:05 -0800)
local variable (Bug#9318).

src/ChangeLog
src/coding.c

index d897fad..0f0365b 100644 (file)
@@ -1,3 +1,8 @@
+2011-12-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * coding.c (encode_designation_at_bol): Don't use uninitialized
+       local variable (Bug#9318).
+
 2011-12-05  Kenichi Handa  <handa@m17n.org>
 
        * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
index b174307..537f69e 100644 (file)
@@ -4356,7 +4356,7 @@ encode_designation_at_bol (struct coding_system *coding,
                           int *charbuf, int *charbuf_end,
                           unsigned char *dst)
 {
-  unsigned char *orig;
+  unsigned char *orig = dst;
   struct charset *charset;
   /* Table of charsets to be designated to each graphic register.  */
   int r[4];