message: RPCConsole: Throw when overflowing size_t type for array indices
diff: @@ -247,10 +247,11 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
  UniValue subelement;
  if (lastResult.isArray())
  {
  - for(char argch: curarg)
  - if (!IsDigit(argch))
  + const auto parsed{ToIntegral<size_t>(curarg)};
  + if (!parsed) {
  throw std::runtime_error("Invalid result query");
  - subelement = lastResult[LocaleIndependentAtoi<int>(curarg)];
  + }
  + subelement = lastResult[parsed.value()];
  }
  else if (lastResult.isObject())
  subelement = find_value(lastResult, curarg);
  