Error shows in receiver code for RC4 decryption

MarkT:
The RC4 code shouldn't be using strlen() since valid encrypted strings will contain null bytes,
strlen assumes a null byte terminates the string. You need to pass in a length count as well as the
char* pointer to the routine.

Also what are you trying to achieve - encryption without authentication isnt normally useful.

Thank you. The encryption I am applying will be changed with authentication after I will be able to implement what I am doing now. Thank you for your suggestion. What should my receiver code so that it can accept all the lines from transmitter?