[vlc-devel] [PATCH] vlc_strftime: avoid infinite loop on windows when format string is invalid
remi at remlab.net
Thu Jan 25 17:43:42 CET 2018
Le torstaina 25. tammikuuta 2018, 18.24.44 EET Pierre Lamot a écrit :
> > The problem is not really specific to Windows, is it? You cannot rely on
> > Windows or glibc extensions then (and I don't see why you would need to
> > either but I have not tried).
> The problem depends upon the implementation of strftime.
> Posix states that the behavior is undefined if a conversion character is
We can intrinsically not handle UB and therefore we do not handle UB, at least
not post-facto. Where practical and useful, you can add post-facto assertions
to aid in debugging - nothing else.
> The issue can be seen on windows when changing the text of the marquee
There are plenty of ways to crash VLC within valid input parameters. We just
have to ensure that any such parameter is _not_ marked safe. Preventing UB is
impossible and therefore out of scope.
More information about the vlc-devel