Commit 43a5855
authored
Add Check for WordCount Against SPIRV File Size (#3266)
A check is inserted in `parseAndCreateSPIRVEntry` function to ensure the
`WordCount` for the current SPIR-V instruction is not smaller than the
remaining input stream size. If the stream does not contain enough data
for the specified `WordCount`, an SPIRV error of `InvalidWordCount` is
raised.1 parent 8e82970 commit 43a5855
File tree
4 files changed
+26
-4
lines changed- lib/SPIRV
- libSPIRV
4 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2088 | 2088 | | |
2089 | 2089 | | |
2090 | 2090 | | |
2091 | | - | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
2092 | 2095 | | |
2093 | 2096 | | |
2094 | 2097 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
416 | 419 | | |
417 | 420 | | |
418 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2385 | 2385 | | |
2386 | 2386 | | |
2387 | 2387 | | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
2388 | 2405 | | |
2389 | 2406 | | |
2390 | 2407 | | |
| |||
0 commit comments