[PATCH] p2p: Fix DBus crash and return additional information for P2P group properties

Jouni Malinen j at w1.fi
Sat Feb 4 06:12:04 EST 2012


On Fri, Feb 03, 2012 at 04:46:01PM -0800, Angie Chinchilla wrote:
> From: Todd Previte <toddx.a.previte at intel.com>
> When using DBus to get group properties, a segmentation fault is generated on P2P
> clients due to a NULL pointer for the ap_iface struct. The current implementation
> only returns vendor extensions when called on a P2P group owner.
> 
> The code now checks the P2P role which allows for role-specific information to be
> provided. This also fixes the crash issue by only looking for the correct structures
> based on the current P2P role.

Thanks! Applied. Please note that there were number of pointers that
could still be left to NULL in some corner cases and then get
dereferences. I don't know whether these would really happen in
practice, but anyway, static code analyzers would complain and it is
safer to validate the cases, so I added some more checks to the
function.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list