BUG in wpa_supplicant from GIT HEAD

Pavel Roskin proski at gnu.org
Tue Mar 16 01:36:11 EDT 2010

On Mon, 2010-03-15 at 15:00 +0100, Holger Schurig wrote:
> Is there a specific reason that calls to driver-functions use "void *"?

It's used where driver specific data is passed.  Any more specific
pointer would require casts, which could hide worse errors.

One possible way to harden the code would be to pass ctx and let the
drivers find the private data using container_of().  Since ctx is a void
pointer itself, it should be changed to a pointer to a structure pointer
to avoid similar mistakes.

The required changes will affect all drivers and could introduce

For a large project with many contributors, such hardening would pay off
in the long term, but I'm not sure about hostapd/wpa_supplicant.

Pavel Roskin

More information about the HostAP mailing list