remove most occurences of strcpy/strcat #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
those functions are insecure and in the case of strcat even slow,
since the strlen has to be checked on each call.
they are considered a code-smell; instead, snprintf should be used.
snprintf(buf, sizeof buf, "%s", mystring) is the only way offered
by C99 to do a bounds-checked copy of a string (and after parsing
the format string (which should only take a handful of cycles),
performance is identical to a naive strcpy implementation using
a for loop until 0 is hit).
note that strncpy() always fills the entire buffer, so it is a
performance hog.