Files
systemd/src/basic
Thomas Haller 1a35985264 in-addr-util: fix undefined result for in4_addr_netmask_to_prefixlen(<0.0.0.0>)
u32ctz() was undefined for zero due to __builtin_ctz() [1].
Explicitly check for zero to make the behavior defined.

Note that this issue only affected in4_addr_netmask_to_prefixlen()
which is the only caller.

It may seem slightly odd, to return 32 (bits) for utz(0). But that
is what in4_addr_netmask_to_prefixlen() needs, and it probably makes
the most sense here.

[1] https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

Fixes: ba91431154
2018-12-14 11:15:36 +01:00
..
2018-12-02 06:34:25 +01:00
2018-10-26 10:52:41 +02:00
2018-10-26 10:52:41 +02:00
2018-06-29 11:02:17 +09:00
2018-06-14 13:03:20 +02:00
2018-06-14 13:03:20 +02:00
2018-06-14 13:03:20 +02:00
2018-12-06 07:01:29 +01:00
2018-12-07 11:48:41 +09:00
2018-12-07 12:46:55 +01:00
2018-05-22 16:13:45 +02:00
2018-11-26 22:17:34 +01:00
2018-06-29 11:02:17 +09:00
2018-11-26 14:06:01 +01:00
2018-06-29 11:02:17 +09:00
2018-10-26 10:52:41 +02:00
2018-09-26 16:14:29 +02:00
2018-09-26 16:14:29 +02:00
2018-09-25 15:57:47 +02:00