Simon McVittie 4496ef91b5 g_hostname_is_ip_address: detect integer overflow
Signed integer overflow is undefined behaviour, which the undefined
behaviour sanitizer detects.

Previously, if the compiler had implemented this in the obvious way
(overflowing signed multiplication wraps around mod 2**32), we would
have incorrectly classified addresses where one octet was, for example,
(2**32 + 42) as valid IP addresses, by treating that octet as though
it was 42.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
2016-12-02 19:10:45 +00:00
..
2014-01-31 14:31:55 +01:00
2016-09-21 18:31:04 +02:00
2011-06-12 16:17:30 -04:00
2014-02-01 20:46:29 -05:00
2015-09-21 06:44:58 -04:00
2015-06-29 08:20:26 -07:00
2014-01-31 14:31:55 +01:00
2014-02-19 19:41:52 -05:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2013-11-20 09:16:16 -05:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-04-07 08:43:24 -05:00
2014-01-31 14:31:55 +01:00
2016-10-12 21:30:42 +02:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-07-16 20:48:41 -04:00
2016-07-16 20:48:41 -04:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-06-29 15:16:52 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-05-09 18:47:42 +02:00
2014-02-19 19:41:52 -05:00
2014-01-31 14:31:55 +01:00
2015-11-02 20:03:38 +02:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-02-24 11:27:09 +01:00
2014-01-31 14:31:55 +01:00
2016-04-11 23:31:38 -04:00
2014-01-31 14:31:55 +01:00
2016-10-12 21:30:42 +02:00
2015-01-14 16:21:00 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-02-19 19:41:52 -05:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-02-19 19:41:52 -05:00
2016-09-21 18:31:04 +02:00
2016-10-13 21:52:42 +01:00
2014-01-31 14:31:55 +01:00
2014-06-28 12:49:38 -04:00
2016-09-21 18:31:04 +02:00
2014-01-31 14:31:55 +01:00
2016-06-04 20:38:33 +02:00
2016-04-27 13:17:27 +00:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-09-09 08:50:55 -03:00
2014-01-31 14:31:55 +01:00
2014-01-31 14:31:55 +01:00
2016-10-12 15:07:31 -04:00
2014-01-31 14:31:55 +01:00