1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-30 11:42:04 +00:00
mpv/demux
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
..
codec_tags.c demux: add "BIKb" FourCC 2014-04-08 22:59:53 +02:00
codec_tags.h
demux_cue.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
demux_edl.c
demux_lavf.c demux_lavf: remove unused symbol 2014-06-23 01:15:58 +02:00
demux_libass.c demux_libass: change how external ASS subtitles are loaded 2014-03-15 22:17:51 +01:00
demux_mf.c demux_mf: remove global option variables 2014-06-11 00:39:13 +02:00
demux_mkv.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
demux_playlist.c Add more const 2014-06-11 00:39:14 +02:00
demux_raw.c demux: simplify packet resizing 2014-06-13 02:02:30 +02:00
demux_subreader.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
demux.c demux: minor cleanups 2014-07-01 21:53:23 +02:00
demux.h demux: minor cleanups 2014-07-01 21:53:23 +02:00
ebml.c demux: minor cleanups 2014-07-01 21:53:23 +02:00
ebml.h demux: minor cleanups 2014-07-01 21:53:23 +02:00
matroska.h demux_mkv: add S_DVBSUB 2014-06-17 22:44:27 +02:00
mf.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
mf.h demux: mp_msg conversions 2013-12-21 21:43:16 +01:00
ms_hdr.h
packet.h demux: export dts from demux_lavf, use it for avi 2013-11-25 23:13:01 +01:00
stheader.h audio: rename i_bps to 'bitrate' to avoid confusion 2014-05-28 21:37:50 +02:00