setprop: check if not setprop value but setprop name starts with "ro."
When setting property with setprop, a property name which starts with "ro." could be set no matter how long the value name is. Change-Id: Ia035ef009952db08ae8a6d4a2b8b9567d86124fc
This commit is contained in:
parent
f0db2406f7
commit
2c6b83f4d2
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ extern "C" int setprop_main(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
|
||||
if (value.size() >= PROP_VALUE_MAX && !StartsWith(value, "ro.")) {
|
||||
if (value.size() >= PROP_VALUE_MAX && !StartsWith(name, "ro.")) {
|
||||
std::cerr << "Value '" << value << "' is too long, " << value.size()
|
||||
<< " bytes vs a max of " << PROP_VALUE_MAX << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
|
|
Loading…
Reference in a new issue