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

* commit '089fe38ac5a3f12588cc5728ee11a1b0c6f436f3':
  Fix integer overflows in recovery procedure.