summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-01-19 22:35:41 +0800
committerChong Yidong <cyd@gnu.org>2012-01-19 22:35:41 +0800
commit76774ec8c5284dd327c13e468293a99c04103720 (patch)
treef024367ad551063232cc6b899c88c8d9d8d6d3ea /src
parenta32a7dc7214bf5f618d50d0143fe5f8159445d2d (diff)
downloademacs-76774ec8c5284dd327c13e468293a99c04103720.tar.gz
Fix usage of unitialized local var (backport from trunk)
* src/coding.c (encode_designation_at_bol): Don't use uninitialized local variable (Bug#9318).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/coding.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5b25a68259a..4af3a5aa40a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * coding.c (encode_designation_at_bol): Don't use uninitialized
+ local variable (Bug#9318).
+
2012-01-19 Kenichi Handa <handa@m17n.org>
* coding.c (encode_designation_at_bol): New args charbuf_end and
diff --git a/src/coding.c b/src/coding.c
index 9a2c1f9c3f2..898bfd71f43 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -4515,7 +4515,7 @@ encode_designation_at_bol (coding, charbuf, charbuf_end, dst)
int *charbuf, *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];