[PATCH v2][BZ 16852] Do not clobber recvmmsg argument.
Rich Felker
dalias@libc.org
Mon Apr 28 18:07:00 GMT 2014
On Mon, Apr 28, 2014 at 06:04:20PM +0200, OndÅej BÃlka wrote:
> diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c
> index 57ddf31..04a065f 100644
> --- a/sysdeps/unix/sysv/linux/recvmmsg.c
> +++ b/sysdeps/unix/sysv/linux/recvmmsg.c
> @@ -35,14 +35,16 @@
> #ifdef __NR_recvmmsg
> int
> recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
> - const struct timespec *tmo)
> + const struct timespec *_tmo)
> {
> + struct timespec tmo = *_tmo;
> +
This is invalid because a null tmo argument is allowed (and is in fact
the normal usage case). You have to check for it.
Rich
More information about the Libc-alpha
mailing list