Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c6b83f4 authored by sanga1.lee's avatar sanga1.lee Committed by Sanga Lee
Browse files

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
parent f0db2406
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;