atom_parser.c has some bugs in memory allocation and deallocation paths:
1) It uses malloc(x * y) instead of calloc(x, y) without overflow checking;
2) It uses assign instead of strdup() in a few places, leading to double free.
The patch below fixes (at least some) issues found on OpenBSD.