Try to detect overflow without causing signedness warnings.

Change-Id: I957ead1f674e2c56e9c741841fea11395769b238
Reviewed-on: https://code.wireshark.org/review/3398
Reviewed-by: Evan Huus <eapache@gmail.com>