Commit a3e5ae8
Dhanush Varma
fix: crash when reading from stdin with no data
Two bugs: (1) general_loop.c dereferences NULL dec_ctx in the
live_stream progress code when no data was processed. (2) Rust
switch_to_next_file calls demux_ctx.open() for stdin, triggering
null pointer dereference via ptr::null().
Fix: add NULL check for dec_ctx in general_loop.c, and return
early from switch_to_next_file for stdin/network/tcp sources
instead of calling demux_ctx.open().1 parent 9f250b1 commit a3e5ae8
2 files changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
1510 | | - | |
| 1510 | + | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
| |||
1574 | 1574 | | |
1575 | 1575 | | |
1576 | 1576 | | |
1577 | | - | |
| 1577 | + | |
| 1578 | + | |
1578 | 1579 | | |
1579 | 1580 | | |
1580 | 1581 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
| |||
0 commit comments