Skip to content

Commit

Permalink
dplayx: Check REQUESTPLAYERREPLY size before access.
Browse files Browse the repository at this point in the history
  • Loading branch information
baskanov authored and julliard committed Oct 7, 2024
1 parent 6ff9858 commit 70a22f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dlls/dplayx/dplayx_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *
{
LPCDPMSG_NEWPLAYERIDREPLY lpcReply;

if ( dwMsgSize < sizeof( DPMSG_NEWPLAYERIDREPLY ) )
{
free( lpMsg );
return DPERR_GENERIC;
}
lpcReply = lpMsg;

*lpdpidAllocatedId = lpcReply->dpidNewPlayerId;
Expand Down

0 comments on commit 70a22f5

Please sign in to comment.