1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00
mpv/video/out
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
..
cocoa cocoa: use mainScreen as a fallback for window constraining 2014-04-28 21:32:59 +02:00
aspect.c vo: add some general support code for VOs that allow rotation 2014-04-21 02:57:16 +02:00
aspect.h vo: add some general support code for VOs that allow rotation 2014-04-21 02:57:16 +02:00
bitmap_packer.c bitmap_packer: use printf() for fatal message 2013-12-21 20:50:11 +01:00
bitmap_packer.h
cocoa_common.h cocoa: don't use VOCTRL_UPDATE_SCREENINFO 2014-05-06 22:00:17 +02:00
cocoa_common.m cocoa: add fallback for automatic GPU switching 2014-06-15 08:20:06 +02:00
d3d_shader_yuv.h
d3d_shader_yuv.hlsl
dither.c
dither.h
filter_kernels.c filter_kernels: fix nearest scaler 2014-06-04 00:23:31 +02:00
filter_kernels.h
gl_cocoa.c video/out: remove unused config() parameters 2014-05-07 21:34:05 +02:00
gl_common.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
gl_common.h Add more const 2014-06-11 00:39:14 +02:00
gl_header_fixes.h gl_video: support packed YUV formats with Apple extensions 2013-12-02 09:03:30 +01:00
gl_hwdec_vaglx.c video: make mp_image use mp_image_params directly 2014-04-21 02:57:16 +02:00
gl_hwdec_vda.c vda: fix build on OS X 10.7 2014-01-02 22:45:39 +01:00
gl_hwdec_vdpau.c vo_vdpau, vo_opengl: handle vdpau preemption differently 2014-05-10 10:44:16 +02:00
gl_lcms.c video: Generate an accurate CMS matrix instead of hard-coding 2014-06-22 19:02:06 +02:00
gl_lcms.h vo_opengl, cocoa: allow to autoselect a color profile 2014-03-31 22:07:33 +02:00
gl_osd.c vo_opengl: simplify redraw callback OSD handling 2014-06-16 01:00:59 +02:00
gl_osd.h vo_opengl: simplify redraw callback OSD handling 2014-06-16 01:00:59 +02:00
gl_video_shaders.glsl vo_opengl: Make approx-gamma affect OSD/sub 2014-06-22 19:07:02 +02:00
gl_video.c vo_opengl: Make approx-gamma affect OSD/sub 2014-06-22 19:07:02 +02:00
gl_video.h vo_opengl: simplify redraw callback OSD handling 2014-06-16 01:00:59 +02:00
gl_w32.c gl_w32: remove unused variable 2014-06-14 19:17:25 +02:00
gl_wayland.c gl_wayland: remove probably unneeded workaround 2014-05-31 22:00:06 +02:00
gl_x11.c gl_x11: remove workaround for PPC OSX 10.4 2014-05-31 21:56:45 +02:00
pnm_loader.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
pnm_loader.h
vo_caca.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_corevideo.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_direct3d.c video/out: fix redrawing with no video frame for some VOs 2014-06-18 20:04:59 +02:00
vo_image.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_lavc.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_null.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_opengl_old.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
vo_opengl.c vo_opengl: simplify redraw callback OSD handling 2014-06-16 01:00:59 +02:00
vo_sdl.c vo_sdl: fix clearing the screen on reconfig 2014-06-18 20:21:07 +02:00
vo_vaapi.c vo_vaapi: fix reference counting when using software decoding 2014-06-20 19:20:59 +02:00
vo_vdpau.c vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
vo_wayland.c vo_wayland: fix clearing the screen on reconfig 2014-06-18 20:22:10 +02:00
vo_x11.c video/out: fix redrawing with no video frame for some VOs 2014-06-18 20:04:59 +02:00
vo_xv.c vo_xv: de-ancient some help messages 2014-06-21 20:41:07 +02:00
vo.c video: correct spelling: mp_image_params_equals -> mp_image_params_equal 2014-06-17 23:30:27 +02:00
vo.h vo: make draw_image and vo_queue_image transfer image ownership 2014-06-17 23:05:50 +02:00
w32_common.c w32_common: fix typo 2014-05-10 10:44:15 +02:00
w32_common.h win32: don't use VOCTRL_UPDATE_SCREENINFO 2014-05-06 23:04:33 +02:00
wayland_common.c wayland: move subsurfaces to wayland vo 2014-06-15 14:46:27 +02:00
wayland_common.h wayland: move subsurfaces to wayland vo 2014-06-15 14:46:27 +02:00
win_state.c video/out: separate out code to compute window size 2014-05-06 20:22:32 +02:00
win_state.h video/out: separate out code to compute window size 2014-05-06 20:22:32 +02:00
x11_common.c Add more const 2014-06-11 00:39:14 +02:00
x11_common.h x11: cleanup motif hints handling 2014-06-06 18:45:38 +02:00
x11_icon.bin