qcacld-3.0: Avoid info leak in hdd_driver_rxfilter_comand_handler

In hdd_driver_rxfilter_comand_handler(), when kstrtou8() fails to parse
the input string, the value of an uninitialized @type local is logged.
To avoid leaking stack memory, avoid logging the value of @type if the
parsing fails.

Change-Id: I46b21cdb138927b3edc406014450447c58a0d977
CRs-Fixed: 2221085
This commit is contained in:
Dustin Brown
2018-04-18 11:28:15 -07:00
committed by nshrivas
parent 9508263669
commit 933cd2a72f

View File

@@ -6194,7 +6194,7 @@ static int hdd_driver_rxfilter_comand_handler(uint8_t *command,
value = command + 13; value = command + 13;
ret = kstrtou8(value, 10, &type); ret = kstrtou8(value, 10, &type);
if (ret < 0) { if (ret < 0) {
hdd_err("kstrtou8 failed invalid input value %d", type); hdd_err("kstrtou8 failed invalid input value");
return -EINVAL; return -EINVAL;
} }