[PATCH 0/1] MR6153: dplayx: fixed check structure before copy
It seems to me that this is minor fix, but logically it is worth checking availability structure first before copying. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6153
From: Herman Semenov <GermanAizek(a)yandex.ru> --- dlls/dplayx/dplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index d2d9c5f6a4a..8ce499cdefb 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -3006,7 +3006,7 @@ static HRESULT DP_IF_GetPlayerName( IDirectPlayImpl *This, DPID idPlayer, void * lpName->lpszShortNameA = NULL; } - if( lpPList->lpPData->name.lpszShortNameA ) + if( lpPList->lpPData->name.lpszLongNameA ) { strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, lpPList->lpPData->name.lpszLongNameA ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6153
Herman Semenov (@GermanAizek) commented about dlls/dplayx/dplay.c:
if( lpPList->lpPData->name.lpszShortNameA ) { strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, lpPList->lpPData->name.lpszShortNameA ); Above, lpszShortNameA is just being checked correctly.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6153#note_77028
This merge request was approved by Alistair Leslie-Hughes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6153
participants (3)
-
Alistair Leslie-Hughes (@alesliehughes) -
Herman Semenov -
Herman Semenov (@GermanAizek)