Skip to content

Commit

Permalink
staging: wilc1000: fix NULL pointer exception in host_int_parse_assoc…
Browse files Browse the repository at this point in the history
…_resp_info()

Commit fe014d4 (staging: wilc1000: free memory allocated for general info
message from firmware) introduced a bug by using wrong source address in
kmemdup(). 'conn_info.req_ies' is used for source address in kempdup()
instead of 'hif_drv->usr_conn_req.ies'.

This commit fixes the NULL pointer dereference issue in
host_int_parse_assoc_resp_info() by using the correct source address in
kmemdup().

Fixes: fe014d4 (staging: wilc1000: free memory allocated for general info message from firmware)
Signed-off-by: Ajay Singh <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ajaykathat authored and gregkh committed Apr 23, 2018
1 parent edf5c17 commit b00e2fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/wilc1000/host_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
}

if (hif_drv->usr_conn_req.ies) {
conn_info.req_ies = kmemdup(conn_info.req_ies,
conn_info.req_ies = kmemdup(hif_drv->usr_conn_req.ies,
hif_drv->usr_conn_req.ies_len,
GFP_KERNEL);
if (conn_info.req_ies)
Expand Down

0 comments on commit b00e2fd

Please sign in to comment.