Merge "setprop: check if not setprop value but setprop name starts with "ro."" into main

This commit is contained in:
Treehugger Robot 2024-04-22 15:59:44 +00:00 committed by Gerrit Code Review
commit ff086da560

View file

@ -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;