Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2018 17:13:06 +0300 (MSK)
From: Alexander Monakov <amonakov@...ras.ru>
To: musl@...ts.openwall.com
Subject: Re: Why are stdin/stdout/stderr `FILE *const` in musl?

On Fri, 2 Feb 2018, Jens Gustedt wrote:
>  > stderr
>  > stdin
>  > stdout
>  > which are expressions of type "pointer to FILE" that point to the FILE objects associated, respectively,
> 
> which clearly states that these are "expressions" not lvalues, and so
> your code

Note that musl's stdio.h can prevent abuse a bit harder by doing

#define stdin (stdin+0)

(making the expansion an rvalue and &stdin diagnosed with an error)

Alexander

Powered by blists - more mailing lists

Your e-mail address:

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