mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 05:49:27 +00:00
Fix segfault.
Fix code that incorrectly transforms a hidl_string to String8 by using size of another field. Test: none Fixes: 161210887 Change-Id: I54a11e9beab4c825905dda37b121e1fc85658215
This commit is contained in:
@@ -79,7 +79,7 @@ void convertFromHealthConfig(const HealthConfig& c, struct healthd_config *hc) {
|
||||
|
||||
hc->batteryCurrentAvgPath =
|
||||
android::String8(c.batteryCurrentAvgPath.c_str(),
|
||||
c.batteryCurrentNowPath.size());
|
||||
c.batteryCurrentAvgPath.size());
|
||||
|
||||
hc->batteryChargeCounterPath =
|
||||
android::String8(c.batteryChargeCounterPath.c_str(),
|
||||
|
||||
Reference in New Issue
Block a user