Date: Mon, 6 Feb 2017 16:25:29 -0600 From: "A. Wilcox" <awilfox@...lielinux.org> To: musl@...ts.openwall.com Subject: Re: The Great Big POSIX Conformance Thread [phase 1] On 05/02/17 18:01, Rich Felker wrote: > On Sun, Feb 05, 2017 at 05:04:43PM -0600, A. Wilcox wrote: >> getservbyport >> ------------- >> >> Non-conformance of this function was discussed on IRC. Rich Felker >> had said he would apply the patch I wrote, but it has not been >> applied yet. If there is an issue with said patch, please let me know >> so that I may fix it. >> >> >> : >> https://code.foxkit.us/adelie/patches/raw/master/sys-libs/musl/musl-1.1.15-posix-getservbyport.patch > > This patch probably needs to be checked better still. Knowing the > legaycy get*by*_r interfaces, I suspect it's invalid to return without > setting *res to something. Also it might be better to just check > earlier (at the top) if the argument parses as a number, and bail > immediately, rather than first doing all the work then throwing the > result away. In addition to my earlier comments in my last mail, I have found a standard definition for getservbyport_r and it states that on error, *res shall be set to NULL. The function does this at the start, so I think this patch should be conformant. : http://refspecs.linux-foundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-getservbyport-r.html : http://git.musl-libc.org/cgit/musl/tree/src/network/getservbyport_r.c#n23 Best, --arw -- A. Wilcox (awilfox) Project Lead, Adélie Linux http://adelielinux.org View attachment "0001-getservbyport_r-return-ENOENT-if-service-not-found.patch" of type "text/x-patch" (1527 bytes) Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.