buffer overflow protection when strlen(input)>255