EddyRivasLab / hmmer

HMMER: biological sequence analysis using profile HMMs
http://hmmer.org
Other
307 stars 69 forks source link

Fix `p7_hmmfile_WriteASCII` segfaulting on missing consensus sequences #236

Closed althonos closed 3 years ago

althonos commented 3 years ago

Hi !

It was reported in althonos/pyhmmer#5 that the ASCII writer would segfault when writing a freshly created HMM.

It turns out that p7_hmmfile_WriteASCII reads from hmm->consensus before checking if the p7H_CONS flag is set. For HMMs without a consensus line set already, this will read from a NULL pointer.

cryptogenomicon commented 3 years ago

Thanks!