Commit ceab492
Fix two bugs in tabix.c: dead code and missing NULL check
1. Move `detect = 0` outside the error else-block where it was
unreachable dead code after `return 1`. It now executes when a
valid -p type is matched, properly suppressing auto-detection.
2. Add a NULL check on the bgzf_open() return value in the is_all
branch to avoid dereferencing a NULL pointer when the file cannot
be opened.1 parent 1860cb6 commit ceab492
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| |||
0 commit comments