Commit dc2c051
authored
Fix 2 binary fuzz bugs (#1323)
* Check if there is a currFunction before using it (we need it for some stacky code; a valid wasm wouldn't need a function in that location anyhow, as what can be put in a memory/table offset is very limited).
* Huge alignment led us to do a power of 2 shift that is undefined behavior.
Also adds a test facility to check we don't crash on testcases.1 parent 183be2f commit dc2c051
File tree
4 files changed
+18
-1
lines changed- src/wasm
- test/crash
4 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
197 | 208 | | |
198 | 209 | | |
199 | 210 | | |
| |||
576 | 587 | | |
577 | 588 | | |
578 | 589 | | |
| 590 | + | |
579 | 591 | | |
580 | 592 | | |
581 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2202 | 2202 | | |
2203 | 2203 | | |
2204 | 2204 | | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
2205 | 2208 | | |
2206 | 2209 | | |
2207 | 2210 | | |
| |||
2464 | 2467 | | |
2465 | 2468 | | |
2466 | 2469 | | |
2467 | | - | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
2468 | 2473 | | |
2469 | 2474 | | |
2470 | 2475 | | |
| |||
Binary file not shown.
Binary file not shown.
0 commit comments