fix potential overflow and/or divide-by-zero
fix potential overflow and/or divide-by-zero

breadwallet/breadwallet-core,breadwallet/breadwallet-core,breadwallet/breadwallet-core,breadwallet/breadwallet-core,breadwallet/breadwallet-core,breadwallet/breadwallet-core