mpv/misc
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
..
charset_conv.c
charset_conv.h
ctype.h Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
dispatch.c Fix gcc 4.7 warning about shadowing talloc_parent in mp_dispact_queue 2014-05-28 22:44:43 +02:00
dispatch.h dispatch: move into its own source file 2014-04-23 21:16:51 +02:00
ring.c ring: use a different type for read/write pointers 2014-05-30 02:15:25 +02:00
ring.h