hi,
i'm writing a program in C that read from a tcp socket some data.
I know basics functions to work with socket, (bind, read, write) but today i have a question for you.
With read() function i must have a buffer where to save data, but what happen if this buffer is too small? i must put read() in a while loop and realloc my buffer at every cycle?
this sounds like a security risk, a malicious client can send me huge amount of data...
thanks a lot