This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] network: Fix cmsghdr padding in sendmsg (BZ#16919)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, <libc-alpha at sourceware dot org>
- Date: Thu, 26 May 2016 16:27:45 +0000
- Subject: Re: [PATCH] network: Fix cmsghdr padding in sendmsg (BZ#16919)
- Authentication-results: sourceware.org; auth=none
- References: <1464273450-31507-1-git-send-email-adhemerval dot zanella at linaro dot org> <20160526161709 dot GH26300 at vapier dot lan>
On Thu, 26 May 2016, Mike Frysinger wrote:
> i think it should do a length test -- if it's below a threshold, use
> alloca, otherwise fall back to malloc+free. inserting our own limit
> here feels wrong.
sendmsg is required by POSIX to be AS-safe, so can't use malloc+free; it
would have to allocate memory in some other AS-safe way.
Joseph S. Myers