mpv/player
wm4 9a210ca2d5 Audit and replace all ctype.h uses
Something like "char *s = ...; isdigit(s[0]);" triggers undefined
behavior, because char can be signed, and thus s[0] can be a negative
value. The is*() functions require unsigned char _or_ EOF. EOF is a
special value outside of unsigned char range, thus the argument to the
is*() functions can't be a char.

This undefined behavior can actually trigger crashes if the
implementation of these functions e.g. uses lookup tables, which are
then indexed with out-of-range values.

Replace all <ctype.h> uses with our own custom mp_is*() functions added
with misc/ctype.h. As a bonus, these functions are locale-independent.
(Although currently, we _require_ C locale for other reasons.)
2014-07-01 23:11:08 +02:00
..
lua player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
timeline Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
audio.c
client.c
client.h
command.c player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
command.h
configfiles.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
core.h player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
discnav.c
loadfile.c
lua.c
main.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
main_fn.c
misc.c player: fix start position when specifying with percent 2014-06-29 20:39:49 +02:00
osd.c player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
playloop.c player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
screenshot.c player: make the time display relative to start PTS 2014-06-29 20:39:49 +02:00
screenshot.h
scripting.c
sub.c sub: fix undefined behavior with dvd:// 2014-06-28 15:55:24 +02:00
video.c