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 23:40:15 +0200
From: Jens Gustedt <jens.gustedt@...ia.fr>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH] stdio: implement fopencookie(3)

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.

Thanks
Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Your e-mail address:

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