Commit cc326a1
committed
runtime_events_consumer: guard agains short msg_length
msg_length zero could cause us to loop infinitely.
All messages have at least a header and a timestamp,
except EV_INTERNAL (0), which is a padding event.
Extend the testcase by corrupting message lengths.
This also avoids some memory sanitizer warnings.
Rejecting all msg_length < 2 would cause a failure in
test_dropped_events.ml, because padding events would be incorrectly
rejected.
Suggested-by: Miod Vallat <[email protected]>
Signed-off-by: Edwin Török <[email protected]>1 parent b175627 commit cc326a1
File tree
2 files changed
+21
-1
lines changed- otherlibs/runtime_events
- testsuite/tests/lib-runtime-events
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
0 commit comments