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>
(cherry picked from commit 0294b29527d7bb6315cb1097c47e57a362803495)
Reviewed-on: https://code.wireshark.org/review/3399