Hello Max,

I was able to reproduce the AV! 
Please try this change:

function TCustomSocksWSocket.DoRecv()
[..]
        {$IFDEF WIN32}
        //Move(FRcvBuf[FSocksRcvdPtr], Buffer, FSocksRcvdCnt); // ==>
        Move(FRcvBuf[FSocksRcvdPtr], Buffer^, FSocksRcvdCnt); // <==
        {$ENDIF}
        Result        := FSocksRcvdCnt;
        FSocksRcvdCnt := 0;
        Exit;
    end;
    { User buffer is smaller, copy as much as possible }
    {$IFDEF CLR}
    for I := 0 to BufferSize - 1 do
        Buffer[I] := FRcvBuf[FSocksRcvdPtr + I];
    {$ENDIF}
    {$IFDEF WIN32}
    //Move(FRcvBuf[FSocksRcvdPtr], Buffer, BufferSize); // ==>
    Move(FRcvBuf[FSocksRcvdPtr], Buffer^, BufferSize); // <==
    {$ENDIF} 

Does that help?

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to