From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12146 invoked by alias); 2 Mar 2011 21:49:04 -0000 Received: (qmail 12138 invoked by uid 22791); 2 Mar 2011 21:49:03 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Mar 2011 21:48:59 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id ABABB600A; Wed, 2 Mar 2011 13:48:58 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id A2D048EE13; Wed, 2 Mar 2011 13:48:58 -0800 (PST) Message-ID: <4D6EBB4A.9080207@vmware.com> Date: Wed, 02 Mar 2011 21:49:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" CC: vinschen@redhat.com Subject: [rfa] remote-fileio.c, remote_fileio_func_fstat, uninitialized st.st_ino. Content-Type: multipart/mixed; boundary="------------070602040009050508050704" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00132.txt.bz2 This is a multi-part message in MIME format. --------------070602040009050508050704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 236 Hi Corinna, Coverity points out that st.st_ino is un-initialized when it is passed to remote_fileio_to_fio_stat, which uses it. I have no idea if initializing it to zero is the right thing to do. Can you comment? Thanks, Michael --------------070602040009050508050704 Content-Type: text/plain; name="fileio.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fileio.txt" Content-length: 715 2011-03-02 Michael Snyder * remote-fileio.c (remote_fileio_func_fstat): Initialize st_ino to zero. Index: remote-fileio.c =================================================================== RCS file: /cvs/src/src/gdb/remote-fileio.c,v retrieving revision 1.40 diff -u -p -u -p -r1.40 remote-fileio.c --- remote-fileio.c 25 Jan 2011 11:54:00 -0000 1.40 +++ remote-fileio.c 2 Mar 2011 21:41:48 -0000 @@ -1175,6 +1175,7 @@ remote_fileio_func_fstat (char *buf) remote_fileio_to_fio_uint (1, fst.fst_dev); st.st_mode = S_IFCHR | (fd == FIO_FD_CONSOLE_IN ? S_IRUSR : S_IWUSR); st.st_nlink = 1; + st.st_ino = 0; #ifdef HAVE_GETUID st.st_uid = getuid (); #else --------------070602040009050508050704--