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

Commit 8605ae66 authored by Victor Hsieh's avatar Victor Hsieh Committed by android-build-merger
Browse files

Merge "mini-keyctl: fix key id parsing by "0x" prefix"

am: 220241f2

Change-Id: I04006a4f76355bc8edc1a33318320470afffdd26
parents 331d89fb 220241f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static key_serial_t GetKeyringIdOrDie(const std::string& keyring_desc) {
    if (tokens.size() < 9) {
      continue;
    }
    std::string key_id = tokens[0];
    std::string key_id = "0x" + tokens[0];
    std::string key_type = tokens[7];
    // The key description may contain space.
    std::string key_desc_prefix = tokens[8];
@@ -77,7 +77,7 @@ static key_serial_t GetKeyringIdOrDie(const std::string& keyring_desc) {
      continue;
    }
    if (!android::base::ParseInt(key_id.c_str(), &keyring_id)) {
      error(1, 0, "Unexpected key format in /proc/keys");
      error(1, 0, "Unexpected key format in /proc/keys: %s", key_id.c_str());
      return -1;
    }
    return keyring_id;