Skip to content

Conversation

@GermanAizek
Copy link
Contributor

@Atoptool, hi again.

make_proc_dynamicgen() function uses memcpy() instead of strcat() to concatenate strings. This avoids calculating the length of the string multiple times.

Also, for a more simplified readable code and compliance with the standardization of GNU/Linux code, I think the new changes will be easier to maintain in the future.

I checked that total size string (about 167 bytes) does not exceed the buffer size (format, 300 bytes), so overflow is excluded. stpcpy() processes the terminating null character correctly, and the resulting string is formed correctly.

Documentation: https://linux.die.net/man/3/stpcpy

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.

1 participant