am 45aa0227: Merge "Fix potential format string vulnerability"

* commit '45aa022710165c321cdec9a475f269d6932fe1f3':
  Fix potential format string vulnerability
This commit is contained in:
chh 2014-11-25 19:04:12 +00:00 committed by Android Git Automerger
commit 22b99e3a9a

View File

@ -647,12 +647,9 @@ Vector<Sensor> SensorService::getSensorList()
if (canAccessSensor(sensor)) { if (canAccessSensor(sensor)) {
accessibleSensorList.add(sensor); accessibleSensorList.add(sensor);
} else { } else {
String8 infoMessage; ALOGI("Skipped sensor %s because it requires permission %s",
infoMessage.appendFormat( sensor.getName().string(),
"Skipped sensor %s because it requires permission %s", sensor.getRequiredPermission().string());
sensor.getName().string(),
sensor.getRequiredPermission().string());
ALOGI(infoMessage.string());
} }
} }
return accessibleSensorList; return accessibleSensorList;