Be aware that the memset call is likely to be removed if optimizations are enabled. With GCC, you can use the -fno-builtin-memset flag to prevent this, but that may pessimize the generated code elsewhere.
You can find them all over Github usually. The ones I immediately know of are:
There are more, and there are probably better ones than the ones listed above.
I’m really glad to see that other fellow embedded software developers reach similar conclusions about facing software errors head on (otherwise known as Design by Contract – DbC).
In a shameless self-promotion, I’d like to mention my articles and blogs about the same subject matter:
I really like your fuse analogy.
It really hit the nail on the head for me.