I think this still could overflow since it's coerced to a long at the end. You should cast one of the arguments to a `long` to ensure long multiplication is performed.