MISRA.STDLIB.CSTRING.MACROMacro from 'cstring' library is used. MISRA-C++ Rule 18-0-5 (required): The unbounded functions of library '<cstring>' shall not be used.This rule is also covered by MISRA.STDLIB.CSTRING. [Undefined 5.7] RationaleThe strcpy, strcmp, strcat, strchr, strspn, strcspn, strpbrk, strrchr, strstr, strtok and strlen functions within the '<cstring>' library can read or write beyond the end of a buffer, resulting in undefined behaviour. Ideally, a safe string handling library should be used. Example#include <cstring> void fn ( const char_t * pChar ) { char_t array [ 10 ]; strcpy ( array, pChar ); // Non-compliant } |