[fedfs-utils] fix a few coverity-spotted problems

Chuck Lever chuck.lever at oracle.com
Wed Nov 30 13:20:32 PST 2011


On Nov 30, 2011, at 4:13 PM, Jim Meyering wrote:

> Chuck Lever wrote:
>> On Nov 30, 2011, at 3:51 PM, Jim Meyering wrote:
>> 
>>> I noticed that Jeff Layton was preparing to bring 0.7.3 into Fedora
>>> so took a look.  I ran coverity on the latest from git and it found
>>> a few nontrivial problems.
>> 
>> Did you pull from 0.7-stable, or master?  The master branch is going
>> to be the next release, and it's diverged enough that we probably need
>> separate fixes for each branch.
> 
> That was from master (you can see .
> 9791768cc07b1199fcc3196a59e057fc06500a3a

Once these are in master, shall I back port, or do you want to?  The leaks are not worrisome at this point, but something like the sloppy option issue is a misbehavior that should be fixed in 0.7.

>> None of these have a Signed-off-by tag.  That needs to be fixed before
>> I can accept patches.  Have a look at doc/CheckInTests for more
>> information.
> 
> Ok.  I hadn't seen that.
> I'll regenerate them and repost here shortly...
> unless you'd like something else changed, too?
> For example, I did not try to determine which
> commit introduced each of the bugs fixed.

That's a courtesy, but not always required.  If it's not too much trouble, that would be nice to have.

But please do mention which of these was spotted by coverity. Only the first patch description mentions it.

>>> Here are fixes for most of them.
>>> Most arise only on error-paths.
>>> 
>>> [PATCH 1/8] mount avoid one-byte overrun
>>> [PATCH 2/8] fedfsd: don't return freed memory through **pathname
>>> [PATCH 3/8] build: avoid automake warnings about AM_PROG_AR
>>> [PATCH 4/8] mount: don't make -s (sloppy) imply -v (verbose)
>>> [PATCH 5/8] mount: don't leak upon LDAP parse failure
>>> [PATCH 6/8] nsdb: don't leak a read buffer upon certfile open
>>> [PATCH 7/8] libsi: don't leak a struct srvinfo upon failed strdup
>>> [PATCH 8/8] fedfsd: don't double-free upon ENOMEM

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com







More information about the fedfs-utils-devel mailing list