1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00
mpv/stream
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
..
resolve quvi: add option to not fetch subtitles 2014-01-05 23:07:34 +01:00
ai_alsa1x.c Kill all tabs 2014-04-13 18:03:01 +02:00
ai_oss.c Kill all tabs 2014-04-13 18:03:01 +02:00
ai_sndio.c Kill all tabs 2014-04-13 18:03:01 +02:00
audio_in.c Kill all tabs 2014-04-13 18:03:01 +02:00
audio_in.h demux: mp_msg conversions 2013-12-21 21:43:16 +01:00
cache_file.c stream: add a file cache 2014-06-22 05:04:05 +02:00
cache.c cache: avoid race condition between cache wakeup and idling 2014-06-16 01:00:59 +02:00
cookies.c Kill all tabs 2014-04-13 18:03:01 +02:00
cookies.h options: move network related options to MPOpts 2013-12-22 13:11:22 +01:00
discnav.h player: rename dvdnav to discnav 2014-03-30 11:42:49 +09:00
dvb_tune.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
dvb_tune.h stream: mp_msg conversions 2013-12-21 21:43:16 +01:00
dvbin.h stream_dvb: remove global option variables 2014-06-11 00:35:03 +02:00
frequencies.c stream_pvr: remove global option variables 2014-06-11 00:34:42 +02:00
frequencies.h stream_pvr: remove global option variables 2014-06-11 00:34:42 +02:00
rar.c stream: mp_msg conversions 2013-12-21 21:43:16 +01:00
rar.h stream: mp_msg conversions 2013-12-21 21:43:16 +01:00
stream_avdevice.c Add more const 2014-06-11 00:39:14 +02:00
stream_bluray.c stream_bluray: fix some const declarations 2014-06-12 00:55:13 +02:00
stream_cdda.c Add more const 2014-06-11 00:39:14 +02:00
stream_dvb.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
stream_dvd_common.c Add more const 2014-06-11 00:39:14 +02:00
stream_dvd_common.h stream_dvd: minor cleanups 2014-06-11 00:39:13 +02:00
stream_dvd.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
stream_dvdnav.c stream_dvd, stream_dvdnav: map dvd:// to dvdnav 2014-06-20 19:43:51 +02:00
stream_edl.c Add more const 2014-06-11 00:39:14 +02:00
stream_file.c Add more const 2014-06-11 00:39:14 +02:00
stream_lavf.c Add more const 2014-06-11 00:39:14 +02:00
stream_memory.c Add more const 2014-06-11 00:39:14 +02:00
stream_mf.c Add more const 2014-06-11 00:39:14 +02:00
stream_null.c Add more const 2014-06-11 00:39:14 +02:00
stream_pvr.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
stream_rar.c Add more const 2014-06-11 00:39:14 +02:00
stream_smb.c Add more const 2014-06-11 00:39:14 +02:00
stream_tv.c Add more const 2014-06-11 00:39:14 +02:00
stream.c options: add --list-protocols option 2014-06-30 23:20:10 +02:00
stream.h options: add --list-protocols option 2014-06-30 23:20:10 +02:00
tv.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
tv.h tv: remove printing of useless comment information 2014-06-11 00:34:42 +02:00
tvi_def.h Kill all tabs 2014-04-13 18:03:01 +02:00
tvi_dummy.c tv: remove printing of useless comment information 2014-06-11 00:34:42 +02:00
tvi_v4l2.c tv: if timestamp is unset, return NOPTS 2014-06-14 22:17:55 +02:00