Note that this example also contains an unchecked return value (CWE-252) that can lead to a NULL pointer dereference (CWE-476).
This code applies an encoding procedure to an input string and stores it into a buffer.
(bad code)
char * copy_input(char *user_supplied_string){