Design a safe string copy function

The strcpy function from the C String library is prone to buffer overruns. Design a safe strcpy function that takes care of this issue. You are free to change the function prototype if required