- Use of the
strcpy
function to copy a string can lead to a buffer overrun vulnerability. - Use secure versions such as
strcpy_s
to help prevent buffer overruns.
The strcpy
function does not check for sufficient space in the destination buffer.
This is a potential cause of a buffer overrun vulnerability.
A buffer overflow will occur if the source is larger than the destination.
Use secure versions such as strcpy_s
to help prevent buffer overruns.
In the worst case, a buffer overrun vulnerability can provide an attacker the ability to execute arbitrary code leading to complete system compromise.