From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: Problem report #121: base/src/emacs/src/coding.c (decode_coding_charset); UNINIT
Date: Tue, 02 Dec 2008 16:59:50 -0800 [thread overview]
Message-ID: <200812030120.mB31KE60022803@mothra.ics.uci.edu> (raw)
CID: 121
Checker: UNINIT (help)
File: base/src/emacs/src/coding.c
Function: decode_coding_charset
Description: Using uninitialized value "charset"
Event var_decl: Declared variable "charset" without initializer
Also see events: [uninit_use]
5085 struct charset *charset;
5086 int dim;
5087 int len = 1;
5088 unsigned code;
5089
5090 src_base = src;
5091 consumed_chars_base = consumed_chars;
5092
At conditional (1): "charbuf >= charbuf_end" taking false path
5093 if (charbuf >= charbuf_end)
5094 break;
5095
At conditional (2): "byte_after_cr >= 0" taking false path
5096 if (byte_after_cr >= 0)
5097 {
5098 c = byte_after_cr;
5099 byte_after_cr = -1;
5100 }
5101 else
5102 {
At conditional (3): "src == src_end" taking false path
At conditional (4): "multibytep != 0" taking true path
At conditional (5): "c & 128 != 0" taking true path
At conditional (6): "c & 254 == 192" taking true path
At conditional (7): "0" taking false path
5103 ONE_MORE_BYTE (c);
At conditional (8): "eol_crlf != 0" taking true path
At conditional (9): "c == 13" taking false path
5104 if (eol_crlf && c == '\r')
5105 ONE_MORE_BYTE (byte_after_cr);
5106 }
At conditional (10): "c < 0" taking false path
5107 if (c < 0)
5108 goto invalid_code;
5109 code = c;
5110
5111 val = AREF (valids, c);
At conditional (11): "val == Qnil" taking false path
5112 if (NILP (val))
5113 goto invalid_code;
At conditional (12): "val & 7 == 0" taking false path
5114 if (INTEGERP (val))
5115 {
5116 charset = CHARSET_FROM_ID (XFASTINT (val));
5117 dim = CHARSET_DIMENSION (charset);
5118 while (len < dim)
5119 {
5120 ONE_MORE_BYTE (c);
5121 code = (code << 8) | c;
5122 len++;
5123 }
5124 CODING_DECODE_CHAR (coding, src, src_base, src_end,
5125 charset, code, c);
5126 }
5127 else
5128 {
5129 /* VAL is a list of charset IDs. It is assured that the
5130 list is sorted by charset dimensions (smaller one
5131 comes first). */
At conditional (13): "val & 7 == 5" taking false path
5132 while (CONSP (val))
5133 {
5134 charset = CHARSET_FROM_ID (XFASTINT (XCAR (val)));
5135 dim = CHARSET_DIMENSION (charset);
5136 while (len < dim)
5137 {
5138 ONE_MORE_BYTE (c);
5139 code = (code << 8) | c;
5140 len++;
5141 }
5142 CODING_DECODE_CHAR (coding, src, src_base,
5143 src_end, charset, code, c);
5144 if (c >= 0)
5145 break;
5146 val = XCDR (val);
5147 }
5148 }
At conditional (14): "c < 0" taking false path
5149 if (c < 0)
5150 goto invalid_code;
Event uninit_use: Using uninitialized value "charset"
Also see events: [var_decl]
5151 if (charset->id != charset_ascii
5152 && last_id != charset->id)
5153 {
5154 if (last_id != charset_ascii)
5155 ADD_CHARSET_DATA (charbuf, char_offset - last_offset, last_id);
5156 last_id = charset->id;
5157 last_offset = char_offset;
5158 }
51
next reply other threads:[~2008-12-03 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-03 0:59 Dan Nicolaescu [this message]
2008-12-03 5:50 ` Problem report #121: base/src/emacs/src/coding.c (decode_coding_charset); UNINIT Kenichi Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812030120.mB31KE60022803@mothra.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.