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

Commit 9b6da168 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "adb: Use a default _SC_GETPW_R_SIZE_MAX size"

parents d4e20cd0 88c997d4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -293,6 +293,9 @@ std::string adb_get_homedir_path() {
    struct passwd pwent;
    struct passwd* result;
    int pwent_max = sysconf(_SC_GETPW_R_SIZE_MAX);
    if (pwent_max == -1) {
        pwent_max = 16384;
    }
    std::vector<char> buf(pwent_max);
    int rc = getpwuid_r(getuid(), &pwent, buf.data(), buf.size(), &result);
    if (rc == 0 && result) {