Fixed size check in GetCommConfig().

This commit is contained in:
Frank 2003-12-11 04:25:00 +00:00 committed by Alexandre Julliard
parent 5ac00719c8
commit 39a16e8297
1 changed files with 2 additions and 3 deletions

View File

@ -2071,10 +2071,9 @@ BOOL WINAPI GetCommConfig(
if(lpCommConfig == NULL) if(lpCommConfig == NULL)
return FALSE; return FALSE;
r = *lpdwSize < sizeof(COMMCONFIG); /* TRUE if not enough space */
r = *lpdwSize < sizeof(COMMCONFIG);
*lpdwSize = sizeof(COMMCONFIG); *lpdwSize = sizeof(COMMCONFIG);
if(!r) if(r)
return FALSE; return FALSE;
lpCommConfig->dwSize = sizeof(COMMCONFIG); lpCommConfig->dwSize = sizeof(COMMCONFIG);