cpiazza
06-04-2002, 12:47 PM
i'm using ISOURCE_Read to collect binary data being sent as the reasponse to an HTTP Post request.
what i first noticed that that the _Read would return without actually getting all the data being sent back. so i decided to enter a loop, after the initial read, as such:
iBytesRead = ISOURCE_Read(pwri->pisMessage, cb, BUFFER_SIZE);
while (iBytesRead < pwri->lContentLength)
{
iBytesRead += ISOURCE_Read(pwri->pisMessage, cb+iBytesRead, BUFFER_SIZE-iBytesRead);
}
no, this all works fine when i'm debugging, but when executed from outside the debugger i get the following error:
Memor Corruption
SocketRead
which i first though was some buffer overflow, and usually when things work in the debugger and don't when executed normally it's been some sort of data initialization problem, but here it's not the case.
Any ideas?
what i first noticed that that the _Read would return without actually getting all the data being sent back. so i decided to enter a loop, after the initial read, as such:
iBytesRead = ISOURCE_Read(pwri->pisMessage, cb, BUFFER_SIZE);
while (iBytesRead < pwri->lContentLength)
{
iBytesRead += ISOURCE_Read(pwri->pisMessage, cb+iBytesRead, BUFFER_SIZE-iBytesRead);
}
no, this all works fine when i'm debugging, but when executed from outside the debugger i get the following error:
Memor Corruption
SocketRead
which i first though was some buffer overflow, and usually when things work in the debugger and don't when executed normally it's been some sort of data initialization problem, but here it's not the case.
Any ideas?