From 76774ec8c5284dd327c13e468293a99c04103720 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 19 Jan 2012 22:35:41 +0800 Subject: Fix usage of unitialized local var (backport from trunk) * src/coding.c (encode_designation_at_bol): Don't use uninitialized local variable (Bug#9318). --- src/ChangeLog | 5 +++++ src/coding.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 + + * coding.c (encode_designation_at_bol): Don't use uninitialized + local variable (Bug#9318). + 2012-01-19 Kenichi Handa * 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]; -- cgit v1.2.1