Commit b6a5202
modules: hostap: supp_api: Fix possible null deference
Ensure 'params' is not NULL before accessing its fields.
Prevents possible null pointer dereference when calling
strlen(params->ssid).
Delay access to ssid->ssid and ssid->ssid_len until after null check.
Prevents potential crash if wpa_s->current_ssid is NULL.
Signed-off-by: Gaetan Perrot <[email protected]>1 parent 151295f commit b6a5202
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | | - | |
1295 | | - | |
| 1294 | + | |
| 1295 | + | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
| |||
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
| 1306 | + | |
| 1307 | + | |
1306 | 1308 | | |
1307 | 1309 | | |
1308 | 1310 | | |
| |||
1493 | 1495 | | |
1494 | 1496 | | |
1495 | 1497 | | |
1496 | | - | |
| 1498 | + | |
1497 | 1499 | | |
1498 | | - | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1499 | 1507 | | |
1500 | 1508 | | |
1501 | 1509 | | |
| |||
0 commit comments