diff options
author | Zack Weinberg <zackw@panix.com> | 2019-05-22 12:03:57 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-01-08 13:45:45 -0500 |
commit | 225a0f4ef94a6505f2bb28d44d85bb3a9a45e5ef (patch) | |
tree | e01f8c8f3fc2fd914e37a6a9741f14e94c1ea597 /elf/noload.c | |
parent | 39906a3e2c0811b6097ec53cbe7b4d9f2321315e (diff) | |
download | glibc-225a0f4ef94a6505f2bb28d44d85bb3a9a45e5ef.zip glibc-225a0f4ef94a6505f2bb28d44d85bb3a9a45e5ef.tar.gz glibc-225a0f4ef94a6505f2bb28d44d85bb3a9a45e5ef.tar.bz2 |
Don’t include string.h from sys/un.h.
sys/un.h needs strlen in order to define SUN_LEN, but does not need
any of the other things declared by string.h; the path of least
resistance is to prototype strlen locally.
Also, the construct being used to get the size of everything up to the
sun_path member contains a formal dereference of a null pointer and
therefore has undefined behavior. Replace with __SOCKADDR_COMMON_SIZE.
Some old RPC code was relying on sys/un.h to provide all of string.h.
* sys/un.h [__USE_MISC]: Don’t include string.h.
Include bits/types/size_t.h. Prototype strlen locally.
Use __SOCKADDR_COMMON_SIZE for size of leading members of
struct sockaddr_un.
* nis/nis_domain_of.c, nis/yp_xdr.c, sunrpc/svc.c:
Include string.h.
* scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES):
Update.
Diffstat (limited to 'elf/noload.c')
0 files changed, 0 insertions, 0 deletions