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

Stephen Gallagher sgallagh at redhat.com
Tue Dec 8 16:27:23 UTC 2009


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

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.

- -- 
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/

iEYEARECAAYFAksefmsACgkQeiVVYja6o6OX2ACffgVI2msGTgnSwAmHIo4/uwyj
T+EAoKRMMclIykrOEPYfDACQCuAEFtww
=pLsZ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-allocation-error-check.patch
Type: text/x-patch
Size: 2083 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Avoid-returning-uninitialized-result.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-potential-uninitialized-value-errors-in-nsssrv_c.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Fix-potential-uninitialized-value-error-in-responder.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-allocation-error-check.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Avoid-returning-uninitialized-result.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0001.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-potential-uninitialized-value-errors-in-nsssrv_c.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0002.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Fix-potential-uninitialized-value-error-in-responder.patch.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091208/22e7147b/attachment-0003.sig>


More information about the sssd-devel mailing list