[vlc-devel] [PATCH] access directory: try opening files as non blocking (fix #6940).

Tobias Güntner fatbull at web.de
Thu Jun 14 19:03:57 CEST 2012


Am 14.06.2012 17:05, schrieb Rémi Denis-Courmont:
> Le jeudi 14 juin 2012 17:57:34 Francois Cartegnie, vous avez écrit :
>> Le 14/06/2012 06:34, Rémi Denis-Courmont a écrit :
>>> If we assume that non-blocking mode has no effects on directories and
>>> regular files, then this is correct.
>>>
>>> But the specification says not that it has no effects, but that it is
>>> undefined :-(
>>
>> What if we swap stat() & openat() calls ?
>
> TOCTOU bug.

What if you use O_DIRECTORY instead of O_NONBLOCK?

Regards,
Tobias




More information about the vlc-devel mailing list