How do you handle buffer overflows in a resource-constrained environment when building embedded software?