[vlc-devel] [vlc-commits] playlist: m3u: use cctype

Francois Cartegnie fcvlcdev at free.fr
Thu Mar 12 18:40:51 CET 2020


Le 12/03/2020 à 18:26, Remi Denis-Courmont a écrit :

> What do you want with them? It wouldn't change anything w.r.t. UB, even
> if you could use them to force the C locale. And it's going to much
> slower and more complicated than the previous code, or strspn().

According to the spec, that "UB" means "returning non zero on undefined
characters".

I hardly see a false positive with utf8 when that function targets only
values below 0x7F.

When not forced to C locale, the false positive breaks the parsing on a
unexpected utf8 where it should have been parsing chars in the ascii
subset only..

strspn seems at least more cleaner

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list