From owner-svn-src-all@freebsd.org Mon Nov 28 01:16:56 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3CE8C585DC; Mon, 28 Nov 2016 01:16:56 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C53D36E4; Mon, 28 Nov 2016 01:16:56 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id a124so205591577ioe.2; Sun, 27 Nov 2016 17:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8dvyggNus8Ns4JQm1TPy5ykJeKIRt0LDXiAHGuo3aY4=; b=PCtNio8a88YlwDDZ4LEJ/NAX4dfYvETQSUw/46ZjX6qJysiwLDTDUEJoWaAhuHBi7w Ne8vmbLsoqdlxYy5IwHTzNimwkleY1ZJjqgoWD71jhYJnVnQdxrDW2+MF2XB+TVdoWkz mBJNZUkAG16bM0am9UifPLD5kWqpuPv/IJrQxR+8lkzzcbAYSxQTl4A8oectPoXLz6uR kmbcuwWkcDFqSeHASXB3KwMVZlkwgOYhh585s820fypT1gfK4XAUeRlGARvrusnyi4MS 983xvhCLTolgN/Mhuj3RQxqiVH+EkcimKXN3ykzfguY3q8FyR85XVqcW4+oSUeVpJlET dAVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8dvyggNus8Ns4JQm1TPy5ykJeKIRt0LDXiAHGuo3aY4=; b=SJ+1jyFKC5jWxz/z3vSgWaoY6eqHWbdxYo22ovnKSGk/s53ZlPHm9VvoKEJg6KNYPO Y5AiRavqyXJ7abPbqSO+BW6JN+EfMyD45zTX3MOJhdeKr9SxHApfDW+/pQfVSFhl3K+o ki6ORAbM/J9ciO/FjrlxAGisN/wtxbBTdkn+0+LwkJ5BRzyCgxlb1HN09GSrbwZkkkqs ol1Oj80lCzFCQNwHsTYFIzho1gEFYOJvgb2msYnhGW3Mn9ns9jGsByCHygPr7EDSzoQt h2At36EyRiZxtzMG4+Jymdx1CVIzMiaX2SR3seiF2M5n2UxaJ4Tg/w9cp0P31fryt9Tu p59g== X-Gm-Message-State: AKaTC005uQX3qJWGFNLzEbk5TzJCGU2/QYyKHkMXZWn8icm7o587OtIO+PPXR9liGH/YmzxN1Wf2oLvtnuZfig== X-Received: by 10.107.18.230 with SMTP id 99mr14873206ios.41.1480295815769; Sun, 27 Nov 2016 17:16:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.152.204 with HTTP; Sun, 27 Nov 2016 17:16:55 -0800 (PST) In-Reply-To: <201611261550.uAQFo0HC074016@repo.freebsd.org> References: <201611261550.uAQFo0HC074016@repo.freebsd.org> From: Ryan Stone Date: Sun, 27 Nov 2016 20:16:55 -0500 Message-ID: Subject: Re: svn commit: r309194 - head/usr.sbin/syslogd To: Baptiste Daroussin Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 01:16:56 -0000 On Sat, Nov 26, 2016 at 10:50 AM, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Nov 26 15:49:59 2016 > New Revision: 309194 > URL: https://svnweb.freebsd.org/changeset/base/309194 > > Log: > initialize *nextp which could be left uninitialized in case the > configuration > file cannot be open/read > > Reported by: Coverity via cem > MFC after: 2 days > CID: 1365665 > > Modified: > head/usr.sbin/syslogd/syslogd.c > > Modified: head/usr.sbin/syslogd/syslogd.c > ============================================================ > ================== > --- head/usr.sbin/syslogd/syslogd.c Sat Nov 26 15:01:35 2016 > (r309193) > +++ head/usr.sbin/syslogd/syslogd.c Sat Nov 26 15:49:59 2016 > (r309194) > @@ -1835,6 +1835,7 @@ init(int signo) > free((char *)f); > } > Files = NULL; > + *nextp = NULL; > > /* open the configuration file */ > if ((cf = fopen(ConfFile, "r")) == NULL) { > > There is something very wrong in the code here. nextp is never initialized, so obviously we can't access *nextp. I'm surprised that this code can even compile with -Werror. I'd fix it but it'd not clear to me what nextp is intended to do.