[FFmpeg-devel] [PATCH v3 2/2] libavformat/vapoursynth: Update to API version 4, load library at runtime
Stefan Oltmanns
stefan-oltmanns at gmx.net
Mon Jul 29 06:46:01 EEST 2024
Am 28.07.24 um 15:15 schrieb Ramiro Polla:
>> + void *vslibrary = NULL;
>> +#ifdef _WIN32
>> + const HKEY hkeys[] = {HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE};
>> + LONG r;
>> + WCHAR vss_path[512];
>> + DWORD buf_size = sizeof(vss_path) - 2;
>> + char *vss_path_utf8;
>> + int i;
>> +
>> + for (i = 0; i < sizeof(hkeys); i++) {
>
> FF_ARRAY_ELEMS(hkeys)
fixed
>
>> + if ((r = RegGetValueW(hkeys[i], L"SOFTWARE\\VapourSynth",
>> + L"VSScriptDLL", RRF_RT_REG_SZ, NULL,
>> + &vss_path, &buf_size)) == ERROR_SUCCESS)
>> + break;
>> + }
>> + if (r == ERROR_SUCCESS && wchartoutf8(vss_path, &vss_path_utf8)
>> == 0) {
>> + vslibrary = dlopen(vss_path_utf8, RTLD_NOW | RTLD_GLOBAL);
>
> I think calling win32_dlopen() with a full path will be problematic for
> systems without KB2533623. win32_dlopen() might need to be fixed in a
> separate patch.
>
Yes, win32_dlopen would need to check if a full path is already given
and if yes skip all the stuff to determine it's own and system32 path,
but instead just use the given parameter directly. To check if it's a
full path it should be enough to check if it either starts with "\??\"
(NT-style path) or if the second character is ":" (win32 style path).
But is this really is needed for an operating system that reached
support end over 4 years ago and does not have a security patch applied
released over 13 years ago?
I don't know what ffmpeg's exact policy is in this case, just asking.
Best regards
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-avformat-vapoursynth-load-library-at-runtime.patch
Type: text/x-patch
Size: 4552 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20240729/7e355f4b/attachment.bin>
More information about the ffmpeg-devel
mailing list