Commit 2ebe686
Fix handling of skipped lines in
Make normalize_line() report when it skips a line due to a ref
mismatch so that normalize_vcf() knows that it has to go on
to the next one.
Failing to do this caused a crash when the first input line
was skipped because normalize_vcf() attempted to access
data via args->rbuf when nothing had been added.
The input file for the `bcftools norm -c x` did not catch this
because the line it skipped was towards the end of the file.
An extra record has been added at the front, which does trigger
the issue on the original code.bcftools norm -c x
1 parent 57bb27b commit 2ebe686
2 files changed
+17
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2328 | 2328 | | |
2329 | 2329 | | |
2330 | 2330 | | |
2331 | | - | |
2332 | | - | |
| 2331 | + | |
| 2332 | + | |
2333 | 2333 | | |
2334 | 2334 | | |
2335 | 2335 | | |
| |||
2346 | 2346 | | |
2347 | 2347 | | |
2348 | 2348 | | |
2349 | | - | |
| 2349 | + | |
2350 | 2350 | | |
2351 | 2351 | | |
2352 | 2352 | | |
| |||
2388 | 2388 | | |
2389 | 2389 | | |
2390 | 2390 | | |
| 2391 | + | |
2391 | 2392 | | |
2392 | 2393 | | |
2393 | | - | |
| 2394 | + | |
2394 | 2395 | | |
2395 | 2396 | | |
2396 | 2397 | | |
| |||
2408 | 2409 | | |
2409 | 2410 | | |
2410 | 2411 | | |
2411 | | - | |
2412 | | - | |
| 2412 | + | |
2413 | 2413 | | |
2414 | 2414 | | |
2415 | 2415 | | |
| |||
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
2421 | | - | |
2422 | | - | |
| 2421 | + | |
2423 | 2422 | | |
2424 | 2423 | | |
2425 | 2424 | | |
| |||
2428 | 2427 | | |
2429 | 2428 | | |
2430 | 2429 | | |
2431 | | - | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
2432 | 2435 | | |
2433 | 2436 | | |
2434 | 2437 | | |
| |||
2453 | 2456 | | |
2454 | 2457 | | |
2455 | 2458 | | |
2456 | | - | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
2457 | 2463 | | |
2458 | 2464 | | |
2459 | 2465 | | |
| |||
0 commit comments