From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Problem report #121: base/src/emacs/src/coding.c (decode_coding_charset); UNINIT Date: Tue, 02 Dec 2008 16:59:50 -0800 Message-ID: <200812030120.mB31KE60022803@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228267371 1341 80.91.229.12 (3 Dec 2008 01:22:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Dec 2008 01:22:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 03 02:23:54 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L7gSw-0003Gl-Pt for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 02:23:47 +0100 Original-Received: from localhost ([127.0.0.1]:58447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gRm-00052U-FU for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2008 20:22:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7gPe-0003Cu-QE for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7gPe-0003CU-Dp for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:22 -0500 Original-Received: from [199.232.76.173] (port=37559 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7gPd-0003CM-Qh for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:21 -0500 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:48794) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1L7gPc-0008So-U5 for emacs-devel@gnu.org; Tue, 02 Dec 2008 20:20:21 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by barrelv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mB31KElq018293 for ; Tue, 2 Dec 2008 17:20:14 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mB31KE60022803; Tue, 2 Dec 2008 17:20:14 -0800 (PST) Original-Lines: 120 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mB31KElq018293 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:106470 Archived-At: 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