Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
699b52dc
Commit
699b52dc
authored
Mar 21, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Fix bytecode buffer leaks in D3DCompile2().
parent
929615fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
compiler.c
dlls/d3dcompiler_43/compiler.c
+12
-8
No files found.
dlls/d3dcompiler_43/compiler.c
View file @
699b52dc
...
...
@@ -556,17 +556,21 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
vkd3d_shader_free_messages
(
messages
);
}
if
(
!
ret
&&
shader_blob
)
if
(
ret
)
return
hresult_from_vkd3d_result
(
ret
);
if
(
!
shader_blob
)
{
if
(
FAILED
(
hr
=
D3DCreateBlob
(
byte_code
.
size
,
shader_blob
)))
{
vkd3d_shader_free_shader_code
(
&
byte_code
);
return
hr
;
}
memcpy
(
ID3D10Blob_GetBufferPointer
(
*
shader_blob
),
byte_code
.
code
,
byte_code
.
size
);
vkd3d_shader_free_shader_code
(
&
byte_code
);
return
S_OK
;
}
return
hresult_from_vkd3d_result
(
ret
);
if
(
SUCCEEDED
(
hr
=
D3DCreateBlob
(
byte_code
.
size
,
shader_blob
)))
memcpy
(
ID3D10Blob_GetBufferPointer
(
*
shader_blob
),
byte_code
.
code
,
byte_code
.
size
);
vkd3d_shader_free_shader_code
(
&
byte_code
);
return
hr
;
}
HRESULT
WINAPI
D3DCompile
(
const
void
*
data
,
SIZE_T
data_size
,
const
char
*
filename
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment