EBIvariation / vcf-validator

Validation suite for Variant Call Format (VCF) files, implemented using C++11
Apache License 2.0
130 stars 39 forks source link

Segmentation fault on empty vcf file. #154

Closed srbcheema2 closed 6 years ago

srbcheema2 commented 6 years ago

Whenever we try to pass an empty vcf file to vcf-validator it will cause segmentation fault. The problem is with std::equal(first.begin(), first.end(), second.begin()) function while comparing two vectors the second one should have size more than the first vector.

Line of problem : link

srbcheema1 commented 6 years ago

We need to add a condition to check the size of line. It should not be lesser than 5.

hritikgupta commented 6 years ago

Please assign me the issue.

srbcheema1 commented 6 years ago

ya sure @hritikgupta :) you may work on it and submit a PR.

cyenyxe commented 6 years ago

Fixed via #156 and #161 .