开发者

A complete list of unsafe string handling functions and their safer replacements for linux

I am looking开发者_Python百科 for something like that:

strcpy -> strncpy

sprintf -> snprintf

etc

Google does not know I a'm afraid. Do you?


  • strcpy -> strncpy -> strlcpy/strcpy_s
  • strcat -> strncat -> strlcat/strcat_s
  • strtok
  • sprintf -> snprintf
  • vsprintf -> vsnprintf
  • gets -> fgets/gets_s
  • makepath -> _makepath_s (MSDN)
  • _splitpath -> _splitpath_s (MSDN)
  • scanf/sscanf -> sscanf_s (MSDN)
  • snscanf -> _snscanf_s (MSDN)
  • strlen -> strnlen_s (MSDN) / strnlen

MSDN has a article covering banned functions: http://msdn.microsoft.com/en-us/library/bb288454.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜