[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9318: 23.3.50; The first call of encode-coding-region() returns wron
From: |
Paul Eggert |
Subject: |
bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result |
Date: |
Mon, 05 Dec 2011 01:11:53 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111124 Thunderbird/8.0 |
That patch (bzr 106613) causes Emacs to use an uninitialized variable;
I found this via static checking with GCC. I installed the following
further patch, which I think is right and anyway does not introduce a bug --
can you please check it? Thanks.
* coding.c (encode_designation_at_bol): Don't use uninitialized
local variable (Bug#9318).
=== modified file 'src/coding.c'
--- src/coding.c 2011-12-05 07:03:31 +0000
+++ src/coding.c 2011-12-05 09:00:44 +0000
@@ -4356,7 +4356,7 @@
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];