Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
2675cc3f
Unverified
Commit
2675cc3f
authored
Jun 04, 2021
by
Greg Fischer
Committed by
GitHub
Jun 04, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2656 from ShabbyX/fix-oob
Fix OOB write in matrix constructor
parents
de2cb9db
cfdeeb84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+5
-1
No files found.
SPIRV/SpvBuilder.cpp
View file @
2675cc3f
...
...
@@ -2543,7 +2543,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
int
row
=
0
;
int
col
=
0
;
for
(
int
arg
=
0
;
arg
<
(
int
)
sources
.
size
();
++
arg
)
{
for
(
int
arg
=
0
;
arg
<
(
int
)
sources
.
size
()
&&
col
<
numCols
;
++
arg
)
{
Id
argComp
=
sources
[
arg
];
for
(
int
comp
=
0
;
comp
<
getNumComponents
(
sources
[
arg
]);
++
comp
)
{
if
(
getNumComponents
(
sources
[
arg
])
>
1
)
{
...
...
@@ -2555,6 +2555,10 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
row
=
0
;
col
++
;
}
if
(
col
==
numCols
)
{
// If more components are provided than fit the matrix, discard the rest.
break
;
}
}
}
}
...
...
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