Fix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3 am: cae056f219 am: 682d691052 am: ae68f02272
am: a3604da6e1

* commit 'a3604da6e17afbf5b98f1eb2c5fc16bde1731b85':
  Fix integer overflows in recovery procedure.