Commit d123926
committed
Always memset newly reallocated memory
Fuzz testing found a case where memory was left uninitialized after
calling loader_realloc, causing a crash due to reading of that memory.
The fix is to *always* memset newly reallocated memory, since a value of
zero is a good default value, especially if that memory is for a list.
This commit removes the redundant memsets, since realloc now has the
responsibility to initialize memory.1 parent fb22e75 commit d123926
File tree
4 files changed
+7
-3
lines changed- loader
- tests
- framework/data/fuzz_test_minimized_test_cases
4 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
328 | 326 | | |
329 | 327 | | |
330 | 328 | | |
| |||
439 | 437 | | |
440 | 438 | | |
441 | 439 | | |
442 | | - | |
443 | 440 | | |
444 | 441 | | |
445 | 442 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
| |||
0 commit comments