mpv/video/out
nanahi 9a861c930b image_writer: fix TOCTOU in screenshot filename generation
The screenshot command is documented to not overwrite existing files.
However, there is a race window between the filename is generated with
gen_fname and when the file is open to write. Specifically, the
convert_image function in this window can be very time consuming
depending on video and screenshot image format and size. This results
in existing file being overwritten because the file writing functions
don't check for the existance of file.

Fix this be opening the file in exclusive mode. Add overwrite parameter to
write_image for other operations that are documented to overwrite existing
files, like screenshot-to-file. Note that for write_avif, checking
existance is used instead because avio_open does not support exclusive
open mode.
2024-03-19 19:30:27 +01:00
..
d3d11 d3d11: get real on the wire bits per color channel 2024-03-17 14:28:00 +01:00
gpu video/out/gpu/spirv: fix warning: zero size arrays are an extension 2024-03-19 08:58:18 +01:00
gpu_next vo_gpu_next: fix -Wembedded-directive warning 2024-03-19 08:58:18 +01:00
hwdec various: fix -Wold-style-declaration warning 2024-03-19 08:58:18 +01:00
mac mac/view: optimise drag and drop event handling 2024-03-16 15:29:27 +01:00
opengl context_drm_egl: log fallback correctly 2024-03-16 13:27:34 +01:00
placebo video/out/placebo/utils: fix -Wignored-qualifiers warning 2024-03-19 08:58:18 +01:00
vulkan vulkan: remove color_depth stub 2024-03-19 09:06:01 +01:00
win32 win32: resolve dropped shell links (Windows shortcuts) 2024-03-19 11:34:00 +01:00
wldmabuf vo_dmabuf_wayland: drop linux-dmabuf-v2 (again) 2023-06-16 14:46:59 +00:00
android_common.c video/out/android: assert WinID value before use 2023-06-03 17:07:43 +02:00
android_common.h
aspect.c aspect: remove unused multiplication 2023-10-23 00:10:42 +00:00
aspect.h
bitmap_packer.c
bitmap_packer.h
cocoa_cb_common.swift mac/helper: move input ctx related functionality into new input helper 2024-03-14 23:33:15 +01:00
dither.c dither: removed some unused code 2023-10-16 15:38:59 +00:00
dither.h
dr_helper.c mp_thread: prefer tracking threads with id 2023-11-05 17:36:17 +00:00
dr_helper.h mp_thread: prefer tracking threads with id 2023-11-05 17:36:17 +00:00
drm_atomic.c
drm_atomic.h
drm_common.c vo_drm: add support for YUYV format 2024-03-16 13:27:34 +01:00
drm_common.h vo_drm: add support for YUYV format 2024-03-16 13:27:34 +01:00
drm_prime.c
drm_prime.h
filter_kernels.c various: replace dead links in comments 2024-02-11 04:01:24 +00:00
filter_kernels.h vo_gpu: remove --scale-cutoff etc 2023-09-25 12:45:17 +02:00
libmpv.h
libmpv_sw.c
mac_common.swift mac/helper: move input ctx related functionality into new input helper 2024-03-14 23:33:15 +01:00
meson.build meson: rename all features with underscores 2023-08-20 21:13:37 +00:00
present_sync.c present_sync: remove unneeded clear_values function 2023-11-07 00:52:46 +00:00
present_sync.h present_sync: remove unneeded clear_values function 2023-11-07 00:52:46 +00:00
vo.c vo: move target_params into responsibility of VO 2024-03-16 13:27:34 +01:00
vo.h vo: move target_params into responsibility of VO 2024-03-16 13:27:34 +01:00
vo_caca.c vo: fully replace draw_image with draw_frame 2023-10-01 14:48:38 +00:00
vo_direct3d.c vo_direct3d: remove redundant condition 2023-11-18 23:55:28 +00:00
vo_dmabuf_wayland.c vo_dmabuf_wayland: scale smarter in hidpi situations 2024-01-27 05:12:12 +00:00
vo_drm.c vo_{drm,wlshm}: make query_format checks more correct 2024-03-16 13:27:34 +01:00
vo_gpu.c vo_gpu/vo_gpu_next: fix transparency in glx 2024-03-13 22:39:31 +00:00
vo_gpu_next.c vo_gpu_next: make `dither-depth=auto` mean 8 bpc for non-d3d11 SDR 2024-03-19 09:06:01 +01:00
vo_image.c image_writer: fix TOCTOU in screenshot filename generation 2024-03-19 19:30:27 +01:00
vo_kitty.c vo_kitty: init all fields of struct sigaction before using it 2023-11-28 10:46:16 +01:00
vo_lavc.c csputils: replace mp_colorspace with pl_color_space 2024-01-22 14:54:55 +00:00
vo_libmpv.c osdep/mac: make mac naming of files, folders and function consistent 2024-02-28 15:52:47 +01:00
vo_mediacodec_embed.c hwdec: fix undeclared identifier in mediacodec_embed 2023-06-28 10:29:24 -07:00
vo_null.c timer: change mp_sleep_us to mp_sleep_ns 2023-10-10 19:10:55 +00:00
vo_sdl.c vo_sdl: support the focused property 2023-12-29 11:31:18 +01:00
vo_sixel.c vo_sixel: change exit-clear handling to OPT_REPLACED 2023-09-21 16:06:29 +00:00
vo_tct.c vo: fully replace draw_image with draw_frame 2023-10-01 14:48:38 +00:00
vo_vaapi.c csputils: replace mp_colorspace with pl_color_space 2024-01-22 14:54:55 +00:00
vo_vdpau.c vo: remove VOCTRL_SET_EQUALIZER and simplify into UPDATE_VIDEO 2024-02-17 18:56:20 +00:00
vo_wlshm.c vo_{drm,wlshm}: make query_format checks more correct 2024-03-16 13:27:34 +01:00
vo_x11.c vo_{drm,wlshm,x11}: add support for video-target-params 2024-03-16 13:27:34 +01:00
vo_xv.c csputils: replace mp_colorspace with pl_color_space 2024-01-22 14:54:55 +00:00
w32_common.c win32: remove all NC area on Windows 10 with --title-bar=no 2024-03-18 02:22:28 +00:00
w32_common.h w32_common: add function to control window transparency state 2024-02-17 16:06:33 +00:00
wayland_common.c wayland_common: respect compositor's preferenced size on state change 2024-03-17 14:59:26 +00:00
wayland_common.h wayland: guess the first hidpi frame better 2024-03-04 22:42:46 +01:00
win_state.c
win_state.h
x11_common.c x11_common: unmaximize window on runtime geometry change 2024-03-17 14:59:26 +00:00
x11_common.h x11_common: fix window x/y position when updating geometry on runtime 2024-03-17 14:59:26 +00:00