fib: fix possible integer overflow