Fix potential format string vulnerability
A sensor name containing a format string could have interesting side effects... Change-Id: If7f1378aa68572d9716c339728eab18faa6b9f2a Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
This commit is contained in:
parent
2e42a90653
commit
5f6199373d
@ -617,12 +617,9 @@ Vector<Sensor> SensorService::getSensorList()
|
||||
if (canAccessSensor(sensor)) {
|
||||
accessibleSensorList.add(sensor);
|
||||
} else {
|
||||
String8 infoMessage;
|
||||
infoMessage.appendFormat(
|
||||
"Skipped sensor %s because it requires permission %s",
|
||||
ALOGI("Skipped sensor %s because it requires permission %s",
|
||||
sensor.getName().string(),
|
||||
sensor.getRequiredPermission().string());
|
||||
ALOGI(infoMessage.string());
|
||||
}
|
||||
}
|
||||
return accessibleSensorList;
|
||||
|
Loading…
Reference in New Issue
Block a user