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

Commit 5696e635 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Otapreopt: Fix property handling

Follow-up to commit 1b9d9a60.

In the previous CL, a strncpy was translated incorrectly to a
strlcpy. Fix the glitch.

Bug: 36655947
Bug: 66996038
Test: manual A/B OTA
Change-Id: I387ff8436de351a3cec5458b3ef013e15905a046
parent ae314211
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -150,10 +150,9 @@ class OTAPreoptService {
            value[kPropertyValueMax - 1] = 0;
            return strlen(default_value);// TODO: Need to truncate?
        }
        size_t size = std::min(kPropertyValueMax - 1, prop_value->length());
        size_t size = std::min(kPropertyValueMax - 1, prop_value->length()) + 1;
        strlcpy(value, prop_value->data(), size);
        value[size] = 0;
        return static_cast<int>(size);
        return static_cast<int>(size - 1);
    }

    std::string GetOTADataDirectory() const {