malloc函数调用时出现断点的一个可能原因

strcpy_s()函数的参数使用不当

先写一个关于strlen_s(const char* str, size_t strz)函数的tips:

  return zero if str is a null pointer

  return strz if the null character('\0') was not found in the first strz bytes of str.

 

在vs2019的c语言程序中,最好是限制destsz大于等于源字符串的长度,但是小于等于目标字符串的长度

posted @ 2021-06-25 21:01  平心执剑  阅读(280)  评论(0)    收藏  举报