Earlier quoted context omitted.
Rust would take the growable container approach here, so it wouldn't be vulnerable in the same way. There's nothing in C that prevents you from doing this either, but as the parent post mentions it's common style to do this (see also things like snprintf).
> There's nothing in C that prevents you from doing this either Yet these errors consistently happen in C projects of various sizes.
At the moment rust is used for some very marginal and unimportant leaf projects.