libertas: fix improper return value

Kalle Valo kvalo at
Thu Jan 19 04:39:13 PST 2017

Pan Bian <bianpan2016 at> wrote:
> Function lbs_cmd_802_11_sleep_params() always return 0, even if the call
> to lbs_cmd_with_response() fails. In this case, the parameter @sp will
> keep uninitialized. Because the return value is 0, its caller (say
> lbs_sleepparams_read()) will not detect the error, and will copy the
> uninitialized stack memory to user sapce, resulting in stack information
> leak. To avoid the bug, this patch returns variable ret (which takes
> the return value of lbs_cmd_with_response()) instead of 0.
> Bugzilla:
> Signed-off-by: Pan Bian <bianpan2016 at>

Patch applied to wireless-drivers-next.git, thanks.

259010c509b6 libertas: fix improper return value


Documentation about submitting wireless patches and checking status
from patchwork:

More information about the libertas-dev mailing list