Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 22:08:08 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] stdio: implement fopencookie(3)

On Tue, Oct 10, 2017 at 11:40:15PM +0200, Jens Gustedt wrote:
> Hello Rich,
> 
> On Tue, 10 Oct 2017 16:56:54 -0400 Rich Felker <dalias@...c.org> wrote:
> 
> > Also note that while standard functions in POSIX can additionally be
> > defined as function-like macros, they can't be object-like macros, so
> > (*read), etc. are safe due to the parentheses.
> 
> They would only be safe in the header. They are not safe on the using
> side, I think. Something like
> 
>     toto->read = whatever;
> 
> or
> 
>     *toto = (cookie_io_functions_t){ .read = another, }
> 
> can't be protected by parenthesis.

It doesn't have to be, because it doesn't have the token ( immediately
following it.

Rich

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ