mpv/sub
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
..
ass_mp.c Basic xdg directory implementation 2014-06-26 19:37:25 +02:00
ass_mp.h sub: fix undefined behavior in ASS color calculation 2014-05-10 10:44:16 +02:00
dec_sub.c sub: prefer ffmpeg microdvd converter over internal one 2014-06-15 21:10:38 +02:00
dec_sub.h
draw_bmp.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
draw_bmp.h
find_subfiles.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
find_subfiles.h
img_convert.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
img_convert.h
osd.c video: introduce failure path for image allocations 2014-06-17 22:43:43 +02:00
osd.h video/out: change aspects of OSD handling 2014-06-15 20:53:15 +02:00
osd_dummy.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
osd_font.otf osd: Center the volume icon in the osd font 2014-06-10 02:16:46 +02:00
osd_libass.c sub: uglify OSD code path with locking 2014-01-18 01:27:43 +01:00
osd_state.h video/out: change aspects of OSD handling 2014-06-15 20:53:15 +02:00
sd.h demux_libass: change how external ASS subtitles are loaded 2014-03-15 22:17:51 +01:00
sd_ass.c sub: remove old style override option 2014-06-05 01:10:48 +02:00
sd_lavc.c sd_lavc: fix stupidity 2014-06-19 18:49:46 +02:00
sd_lavc_conv.c Remove some more unneeded version checks 2014-03-16 13:19:28 +01:00
sd_lavf_srt.c
sd_microdvd.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
sd_movtext.c
sd_srt.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00