45f0961 Prevent integer overflow in ReadVarInt. (Gregory Maxwell)
Tree-SHA512: 385ea0efb6b59d44c45a49227e5f6fff236b4775544cbeb236312a3fd87fd75c226ac56f7aa1bca66b853639da75a579610074f7582f92cf2ebd4a74bc40f6f0
Backport of Core PR 9693
https://github.com/bitcoin/bitcoin/pull/9693/