Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 08:34:36 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        emaste@freebsd.org
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r299926 - head/lib/libpam/modules/pam_unix
Message-ID:  <201605161534.u4GFYaLI071803@gw.catspoiler.org>
In-Reply-To: <CAPyFy2Ao5fnkCfP4Tm62nxjFCV4G1t6-=HxFC5uFC3ieX%2BZWmA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

On 16 May, Ed Maste wrote:
> On 16 May 2016 at 04:34, Don Lewis <truckman@freebsd.org> wrote:
>> Author: truckman
>> Date: Mon May 16 08:34:17 2016
>> New Revision: 299926
>> URL: https://svnweb.freebsd.org/changeset/base/299926
>>
>> Log:
>>   Hoist the getpwnam() call outside the first if/else block in
>>   pam_sm_chauthtok().  Set user = getlogin() inside the true
>>   branch so that it is initialized for the following PAM_LOG()
>>   call.  This is how it is done in pam_sm_authenticate().
> 
> Unfortunately this triggers a warning on powerpc/powerpc64:
> 
> /scratch/tmp/emaste/freebsd/lib/libpam/modules/pam_unix/pam_unix.c: In
> function 'pam_sm_chauthtok':
> /scratch/tmp/emaste/freebsd/lib/libpam/modules/pam_unix/pam_unix.c:278:
> warning: 'retval' may be used uninitialized in this function
> 
> I don't see why GCC warns now and did not before, though.

Strange ...

It turns out that Coverity did notice this, CID 1018711.  It should be
fixed by r299948.



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605161534.u4GFYaLI071803>