Commit 84d9441
fix: bounds checks for MaterialChunk shaderSize=0 and Ktx1Bundle constructor overflow
MaterialChunk::getTextShader: Add early return when shaderSize is 0 to
prevent out-of-bounds write of null terminator at line 284. The bounds
checks added in commit 92dc063 protect the loop body but not the
unconditional null-terminator write after the loop.
Ktx1Bundle 3-argument constructor: Add the same 64-bit overflow check
that the deserialization constructor received in commit 16a7047. The
multiplication numMipLevels * arrayLength * mNumCubeFaces can overflow
uint32_t, causing sizes vector to be undersized.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e8b268b commit 84d9441
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
0 commit comments