From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14500 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC] final time64 switch-over patch series Date: Sun, 4 Aug 2019 00:33:16 -0400 Message-ID: <20190804043316.GM9017@brightrain.aerifal.cx> References: <20190802214433.GA25193@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="55642"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14516-gllmg-musl=m.gmane.org@lists.openwall.com Sun Aug 04 06:33:32 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hu8D5-000EKH-0g for gllmg-musl@m.gmane.org; Sun, 04 Aug 2019 06:33:31 +0200 Original-Received: (qmail 22217 invoked by uid 550); 4 Aug 2019 04:33:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22199 invoked from network); 4 Aug 2019 04:33:28 -0000 Content-Disposition: inline In-Reply-To: <20190802214433.GA25193@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14500 Archived-At: On Fri, Aug 02, 2019 at 05:44:33PM -0400, Rich Felker wrote: > diff --git a/compat/time32/ppoll_time32.c b/compat/time32/ppoll_time32.c > new file mode 100644 > index 00000000..d1eef134 > --- /dev/null > +++ b/compat/time32/ppoll_time32.c > @@ -0,0 +1,10 @@ > +#include "time32.h" > +#define _GNU_SOURCE > +#include > +#include > + > +int __ppoll_time32(struct pollfd *fds, nfds_t n, const struct timespec32 *ts32, const sigset_t *mask) > +{ > + return ppoll(fds, n, (&(struct timespec){ > + .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask); > +} > diff --git a/compat/time32/pselect_time32.c b/compat/time32/pselect_time32.c > new file mode 100644 > index 00000000..5b358c73 > --- /dev/null > +++ b/compat/time32/pselect_time32.c > @@ -0,0 +1,9 @@ > +#include "time32.h" > +#include > +#include > + > +int __pselect_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, const struct timespec32 *restrict ts32, const sigset_t *restrict mask) > +{ > + return pselect(n, rfds, wfds, efds, (&(struct timespec){ > + .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask); > +} > diff --git a/compat/time32/select_time32.c b/compat/time32/select_time32.c > new file mode 100644 > index 00000000..2bd76e33 > --- /dev/null > +++ b/compat/time32/select_time32.c > @@ -0,0 +1,10 @@ > +#include "time32.h" > +#include > +#include > +#include > + > +int __select_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, struct timeval32 *restrict tv32) > +{ > + return select(n, rfds, wfds, efds, (&(struct timeval){ > + .tv_sec = tv32->tv_sec, .tv_usec = tv32->tv_usec})); > +} These all fail to check the timeout argument is non-null before accessing it; caught in testing against Adelie and Alpine i386. There may be other functions with the same problem; need to review them all for this. Rich