mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 07:20:45 +00:00
avutil/hwcontext_d3d11va: Use secure dlopen.
dlopen contains additional security to prevent dll hijacking compared to standard LoadLibrary.
This commit is contained in:
parent
314a783bb8
commit
f0c0ad4455
@ -39,6 +39,7 @@
|
|||||||
#include "pixdesc.h"
|
#include "pixdesc.h"
|
||||||
#include "pixfmt.h"
|
#include "pixfmt.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
#include "compat/w32dlfcn.h"
|
||||||
|
|
||||||
typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory);
|
typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory);
|
||||||
|
|
||||||
@ -55,8 +56,8 @@ static av_cold void load_functions(void)
|
|||||||
// from too many LoadLibrary calls.
|
// from too many LoadLibrary calls.
|
||||||
HANDLE d3dlib, dxgilib;
|
HANDLE d3dlib, dxgilib;
|
||||||
|
|
||||||
d3dlib = LoadLibrary("d3d11.dll");
|
d3dlib = dlopen("d3d11.dll", 0);
|
||||||
dxgilib = LoadLibrary("dxgi.dll");
|
dxgilib = dlopen("dxgi.dll", 0);
|
||||||
if (!d3dlib || !dxgilib)
|
if (!d3dlib || !dxgilib)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user