checkedc
checkedc copied to clipboard
Support C's Bounds Checked Library
C11's Appendix K specifies a lot of bounds-checked functions which include bounds checks, for instance errno_t strcpy_s(char *restrict dest, rsize_t destsz, const char *restrict src);
which is a bounds checked version of strcpy
.
These are only defined if you say you want them, and I don't know how well compilers support them as they're an optional feature, but seems useful given we have some functions we can't currently give bounds to because we don't have enough information from the parameters.