Where is the ``buffer overflow''? You don't read too much data using recv( ), buff will dynamically be extended, and the last loop doesn't break anything either (at least not the code that can be...
Type: Posts; User: Renski
Where is the ``buffer overflow''? You don't read too much data using recv( ), buff will dynamically be extended, and the last loop doesn't break anything either (at least not the code that can be...
int num = recv (s, cstr, 200, 0);
for(int i = 0; i < num; i++) {
buff = buff + cstr[i];
}
if num was 0 or 1, the next for statement wouldnt run. + the overflow only...
Im having problems with a server im writting, its possible to cause a buffer overflow.
thanks you for any help you can give.
buff is a std string
connection::ReadData() {
...