21 ms·
Why would that matter? This was a bug in a POSIX function that all C libraries would be required to implement.
by ajross 11y ago
Why would that matter? This was a bug in a POSIX function that all C libraries would be required to implement.
- tomjakubowski 11y agoAnd the C libraries all implement those functions (mostly) differently. The "lighter weight" standard libraries tend to have simpler implementations of these functions, which may be easier to audit for these kinds of bugs. For example: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/posix/getaddrinfo.c https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/pos... compare with http://git.musl-libc.org/cgit/musl/tree/src/network/getaddrinfo.c http://git.musl-libc.org/cgit/musl/tree/src/network/getaddri...
- JdeBP 11y agoYour musl libc list is too short. GNU libc puts much of getaddrinfo() into one source file. musl libc splits it across several, including: * http://git.musl-libc.org/cgit/musl/tree/src/network/getaddrinfo.c http://git.musl-libc.org/cgit/musl/tree/src/network/getaddri... * http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_serv.c http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_s... * http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_name.c http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_n... * http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_ipliteral.c http://git.musl-libc.org/cgit/musl/tree/src/network/lookup_i... * http://git.musl-libc.org/cgit/musl/tree/src/network/resolvconf.c http://git.musl-libc.org/cgit/musl/tree/src/network/resolvco... See also the BSD libc implementation of getaddrinfo(): * https://svnweb.freebsd.org/base/stable/10/lib/libc/net/getaddrinfo.c?view=markup https://svnweb.freebsd.org/base/stable/10/lib/libc/net/getad... * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c?annotate=1.114&only_with_tag=MAIN http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddr...