[PATCH] new_dbus_handlers: Clear errno
Jouni Malinen
j
Sun Nov 11 01:20:27 PST 2012
On Thu, Nov 08, 2012 at 11:43:19AM -0800, Paul Stewart wrote:
> There are a few instances where dbus handlers test the value
> of errno to test whether strtoul completes successfully.
> Since strtoul does not clear errno, and there's no strong
> reason to suspect that errno is already clear, it is safer
> to clear it right before calling strtoul. Also, any failure
> in strtoul (setting errno non-zero) should be considered a
> failure.
>
> While testing using dbus-send, I found that a malformed
> network path can cause a crash due to net_id being left
> NULL. We should test for this before calling strtoul
> on it.
Thanks, applied.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list