freebsd-nq/lib/libc/inet
Pedro F. Giffuni fee1489eb1 libc: fix cases of undefined behavior.
These were found by the Undefined Behavious  GsoC project at NetBSD:

Avoid undefined behavior in ftok(3)

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

ftok.c:56:10, left shift of 123456789 by 24 places cannot be represented
in type 'int'
ftok.c:56:10, left shift of 4160 by 24 places cannot be represented in
type 'int'

Avoid undefined behavior in an inet_addr.c

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

inet_addr.c:218:20, left shift of 131 by 24 places cannot be represented
in type 'int'

Detected with micro-UBSan in the user mode.

Obtained from:	NetBSD
MFC after:	2 weeks
2018-08-07 15:24:19 +00:00
..
inet_addr.c libc: fix cases of undefined behavior. 2018-08-07 15:24:19 +00:00
inet_cidr_ntop.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_cidr_pton.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_lnaof.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
inet_makeaddr.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
inet_net_ntop.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_net_pton.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_neta.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_netof.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
inet_network.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
inet_ntoa.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
inet_ntop.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
inet_pton.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
Makefile.inc
nsap_addr.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
Symbol.map