What language other than C would allow code to be used from all mainstream languages/frameworks? This is a critical requirement for a lib like openssl, having N such libs for N languages would be a nightmare.
It's possible to define a subset of C++ that can be statically verified to not have this sort of problem. This can also be done with C, but it's more difficult. There are actually people who write in overrun-proof subsets of C++.