Snatch
January 23rd, 2004, 12:36
I recently discovered all of this due to extensive debugging to discover why several games have stopped working. The question is how do I get Microsoft to release a patch about this and how do I inform them of the bug. If I go to their site their support is all crap and they want you to use up incidents or pay for support which is crap. I submitted it to the wish list thing but I doubt that goes anywhere. I want to talk to someone who actually knows what they are doing on the DirectX development team. Maybe you guys know more about this thanks
.
There exists a flaw in the old Directplay(up to 4a) interfaces supported in DirectX 9.0+. In the library file dpwsockx.dll with debugging symbols on the flaw is found in the FastReceive routine. If you try to receive more than 1000h bytes of user data it will not allow it and in fact errors fatally. The following code snippit from dpwsockx.dll from the latest DirectX 9.0b illustrates the problem
.text:5DF03564 and eax, 0FFFFFh ; trim off flags to get number of bytes to receive
.text:5DF03569 mov edi, eax ; put it in the edi as well
.text:5DF0356B jz short loc_5DF03596 ; if 0 bytes then okay
.text:5DF0356D cmp edi, 1000h ; should not be hardcoded at 1000h should be set to buffer size and compared with that
.text:5DF03573 mov [esi+4Ch], edi
.text:5DF03576 jbe short loc_5DF03596 ; if less than or equal to 1000h bytes
.text:5DF03578 cmp dword ptr [esi+54h], 0 ; some sort of flag that cannot be set...
.text:5DF0357C jz short loc_5DF0350D ; if the flag is 0 then fail!
.text:5DF0357E push edi
.text:5DF0357F call _SP_MemAlloc ; do what we should do...
This is from the routine FastReceive in dpwsockx.dll. FastReceive is always used if you have valid Winsock2 DLL library function handles as selected here: FastStreamReceiveThreadProc is what calls FastReceive to do its work.
.text:5DF063C7 push offset _FastStreamReceiveThreadProc@4 ; FastStreamReceiveThreadProc(x)
.text:5DF063CC jmp short loc_5DF063D3
.text:5DF063CE ; ---------------------------------------------------------------------------
.text:5DF063CE
.text:5DF063CE loc_5DF063CE: ; CODE XREF: StartPlayerListenThreads(x,x,x)+58j
.text:5DF063CE push offset _StreamReceiveThreadProc@4 ; lpStartAddress
.text:5DF063D3
Those are the two different options but since the old StreamReceiveThreadProc is never used even though it does not have the 1000h byte limit glitch. This is a confirmed DirectX 9.0+ glitch that affects all interfaces of Directplay from 4a and prior. How can this be reported to Microsoft so a patch can be issued? This has actually taken down a whole game from working.
Snatch

There exists a flaw in the old Directplay(up to 4a) interfaces supported in DirectX 9.0+. In the library file dpwsockx.dll with debugging symbols on the flaw is found in the FastReceive routine. If you try to receive more than 1000h bytes of user data it will not allow it and in fact errors fatally. The following code snippit from dpwsockx.dll from the latest DirectX 9.0b illustrates the problem
.text:5DF03564 and eax, 0FFFFFh ; trim off flags to get number of bytes to receive
.text:5DF03569 mov edi, eax ; put it in the edi as well
.text:5DF0356B jz short loc_5DF03596 ; if 0 bytes then okay
.text:5DF0356D cmp edi, 1000h ; should not be hardcoded at 1000h should be set to buffer size and compared with that
.text:5DF03573 mov [esi+4Ch], edi
.text:5DF03576 jbe short loc_5DF03596 ; if less than or equal to 1000h bytes
.text:5DF03578 cmp dword ptr [esi+54h], 0 ; some sort of flag that cannot be set...
.text:5DF0357C jz short loc_5DF0350D ; if the flag is 0 then fail!
.text:5DF0357E push edi
.text:5DF0357F call _SP_MemAlloc ; do what we should do...
This is from the routine FastReceive in dpwsockx.dll. FastReceive is always used if you have valid Winsock2 DLL library function handles as selected here: FastStreamReceiveThreadProc is what calls FastReceive to do its work.
.text:5DF063C7 push offset _FastStreamReceiveThreadProc@4 ; FastStreamReceiveThreadProc(x)
.text:5DF063CC jmp short loc_5DF063D3
.text:5DF063CE ; ---------------------------------------------------------------------------
.text:5DF063CE
.text:5DF063CE loc_5DF063CE: ; CODE XREF: StartPlayerListenThreads(x,x,x)+58j
.text:5DF063CE push offset _StreamReceiveThreadProc@4 ; lpStartAddress
.text:5DF063D3
Those are the two different options but since the old StreamReceiveThreadProc is never used even though it does not have the 1000h byte limit glitch. This is a confirmed DirectX 9.0+ glitch that affects all interfaces of Directplay from 4a and prior. How can this be reported to Microsoft so a patch can be issued? This has actually taken down a whole game from working.
Snatch