Skip to content

Commit

Permalink
sta_send_frame: Fix NULL pointer deference for NeighSolicitReq
Browse files Browse the repository at this point in the history
Verify that the required SenderIP argument is present before using it.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
  • Loading branch information
Peng Xu authored and jmalinen committed Oct 11, 2017
1 parent 9331962 commit 26b356d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -6412,6 +6412,9 @@ static int cmd_sta_send_frame_hs2_neighsolreq(struct sigma_dut *dut,
char buf[200];
const char *ip = get_param(cmd, "SenderIP");

if (!ip)
return 0;

snprintf(buf, sizeof(buf), "ndisc6 -nm %s %s -r 4", ip, intf);
sigma_dut_print(dut, DUT_MSG_DEBUG, "Run: %s", buf);
if (system(buf) == 0) {
Expand Down

0 comments on commit 26b356d

Please sign in to comment.