[SSSD] [PATCHES] Fix several warnings/potential bugs

Stephen Gallagher sgallagh at redhat.com
Tue Dec 8 17:32:58 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/08/2009 11:41 AM, Simo Sorce wrote:
> On Tue, 2009-12-08 at 11:27 -0500, Stephen Gallagher wrote:
>> Patch 0001: We weren't checking that the asprintf was successfully
>> allocating memory. I converted it to talloc_asprintf() for uniformity
>> as
>> well.
>>
>> Patch 0002: If grouplist was a zero-length array, we would return ret
>> unitialized.
>>
>> Patch 0003: If we jumped to the end before the for-loop, it was
>> possible
>> that we would return an unitialized value of count. It's unlikely that
>> we would ever trust this value, but this patch eliminates the compiler
>> warning.
>>
>> Patch 0004: If we fell into the default case of the switch statement,
>> we
>> would attempt to talloc_free() a random memory location. This patch
>> guarantees that sdp_req is NULL if it has not been initialized.
> 
> ACK all.
> 
> Simo.
> 

Pushed all four to master.

- -- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAksejcoACgkQeiVVYja6o6O4XQCeLMYT7kUcAFcgk7Fy/30UhLc8
ppEAn05jLyRnz5F0J5D2BZN6oMcVSdoC
=E40v
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list