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.
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 fromhmm->consensus
before checking if thep7H_CONS
flag is set. For HMMs without a consensus line set already, this will read from a NULL pointer.