In general, following a combined approach of OpenBSD and MISRA is generally a good way to code. Code defensively, check all external untrusted input (Windows (NT-kernel) has checked and unchecked syscalls).
The "Downloads" link is dead but the other 2 work.