Commit b0c03eb
committed
Fix unchecked fopen() and alloc_demuxer_data() return values in process_hex()
- Add NULL check for fopen() return; call fatal() with appropriate error
code if the file cannot be opened, preventing a segfault on fgets().
- Add NULL check for alloc_demuxer_data() return; close the already-opened
file handle before calling fatal() to avoid a resource leak.
Fixes #22011 parent 03ad9e8 commit b0c03eb
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
371 | 376 | | |
372 | 377 | | |
373 | 378 | | |
374 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
375 | 386 | | |
376 | 387 | | |
377 | 388 | | |
| |||
0 commit comments