Commit ab109cf
fix: crash when reading from stdin with no data (#2210)
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().
Co-authored-by: Dhanush Varma <your@email.com>1 parent c20b408 commit ab109cf
2 files changed
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1516 | 1516 | | |
1517 | 1517 | | |
1518 | 1518 | | |
1519 | | - | |
| 1519 | + | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1587 | 1589 | | |
1588 | 1590 | | |
1589 | 1591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | 155 | | |
158 | 156 | | |
159 | 157 | | |
160 | 158 | | |
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
164 | | - | |
165 | 162 | | |
166 | 163 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
173 | 167 | | |
174 | 168 | | |
175 | 169 | | |
176 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
177 | 174 | | |
178 | 175 | | |
179 | 176 | | |
| |||
0 commit comments