- fix NULL pointer dereferences
- proper strncat/strlcat usage
- fix pointer bool errors
- sizeof vs sizeof(*)
- improper logic fixes