cn-uofbasel / ccn-lite

CCN-lite, a lightweight implementation of the CCNx protocol and its variations
ISC License
74 stars 63 forks source link

Use safe versions of string functions #374

Closed jpfender closed 4 years ago

jpfender commented 4 years ago

Contribution description

Replace sprintf() with snprintf(), strcpy() with strncpy(), and strcat() with strncat() wherever feasible.

Some of these changes might be a little overzealous. Not all uses of the unsafe functions are necessarily unsafe. Feel free to cherrypick/ignore as needed.

Issues/PRs references

Changes follow the same style as #337.

blacksheeep commented 4 years ago

That look like an afford that was necessary for long time, Thanks. I need a moment to test this and check the request.