Skip to content

Commit 3ac5008

Browse files
committed
[nrf noup] zephyr: Fix NULL de-reference
fixup! [nrf noup] zephyr: Fix failure processing of no-response commands Add a NULL check before accessing response and response can be NULL for most commands. Fixes SHEL-2755. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
1 parent b33e82e commit 3ac5008

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wpa_supplicant/wpa_cli_zephyr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print,
8080
printf("%s", buf);
8181
}
8282

83-
if (len > 1 && (strncmp(resp, "FAIL", 4) == 0)) {
83+
if (resp && len > 1 && (strncmp(resp, "FAIL", 4) == 0)) {
8484
wpa_printf(MSG_ERROR, "Command failed: %s", resp);
8585
return -3;
8686
}

0 commit comments

Comments
 (0)