Programming tip #5 — never use strcpy()
Sep 1, 2018 · 1 min read
Actually, there is a whole list of functions in the standard C library (libc) that should never be used in your project!
Let’s mention those that can lead to buffer overflow errors.

They are:
- gets()
- strcpy()
- strcat()
All these functions are part of the standard library and they can lead to a buffer overflow errors.
They are still not deprecated by the standard library itself, but may be it is going to happen down the line.
Instead — use the below replacement functions:
- fgets()
- strncpy()
- strncat()
—Kosta Z
