Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The source and destination pointers are checked to see if they are NULLnull.
  • The maximum length of the destination buffer is checked to see if it is equal to zero, greater than RSIZE_MAX, or less than or equal to the length of the source string.

When a constraint violation is detected, the destination string is set to the NULL null string and the function returns a nonzero value. In the following example, the strcpy_s() function is used to copy src1 to dst1.

...