Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strncat() instead of strncpy() #54

Merged
merged 2 commits into from
May 15, 2017
Merged

Use strncat() instead of strncpy() #54

merged 2 commits into from
May 15, 2017

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented May 15, 2017

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


strncat() NULL-terminates the copied string while strncpy() doesn't!

Appends at most count characters from the character array pointed to by src, stopping if the null character is found, to the end of the null-terminated byte string pointed to by dest. The character src[0] replaces the null terminator at the end of dest. The terminating null character is always appended in the end (so the maximum number of bytes the function may write is count+1).

This template was created based on the work of udemy-dl.

@DL6ER DL6ER merged commit d57f91e into development May 15, 2017
@DL6ER DL6ER deleted the tweak/strncpy branch May 15, 2017 10:23
@DL6ER DL6ER mentioned this pull request May 15, 2017
3 tasks
DL6ER pushed a commit that referenced this pull request Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant