Merge "Fix use of std::stoi without error handling."
am: 886356684c

Change-Id: I2ab8209a9a0bd03ca5ab958b9ed24f88d0165350