Safe Memory Copy

Safe memory copy was introduced in version 6.7, primarily in response to the need to pacify some static code analysis tools that flagged unchecked memory copies. Formerly ASN1C generated code that used the OSCRTLMEMCPY macro to make calls to memcpy (or, by editing the rtxCommonDefs.h file, to a function of the user's choice).

ASN1C now generates code that calls OSCRTLSAFEMEMCPY, which provides checks to ensure that the destination buffer is sufficiently large to hold the source content. In this way, ASN1C helps to prevent potential buffer overflows.

The runtime libraries also use this macro internally.