Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 19 Feb 2020 15:20:50 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: zhangtianci <zhangtianci1@...wei.com>
Cc: musl@...ts.openwall.com, "Songyunlong (Euler)" <yunlong.song@...wei.com>
Subject: Re: [PATCH] stdio: Fix fdopen bug

zhangtianci,

>POSIX's require on fdopen:
>
>     The application shall ensure that the mode of the stream as
> expressed by the mode argument is allowed by the file access mode of
> the open file description to which fildes refers.
>
>So I think the example above should return EINVAL.

No, the "application" is the user code, so this is a requirement for
you, not musl.

Otherwise it would say "The *implementation* shall ensure …"

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

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.