Skip to content
Snippets Groups Projects
Commit 74e2cfb6 authored by Troy Rollo's avatar Troy Rollo Committed by Alexandre Julliard
Browse files

Correct incorrect use of arguments to QueryServiceConfigW.

parent 5b432751
No related branches found
No related tags found
No related merge requests found
......@@ -1803,15 +1803,15 @@ QueryServiceConfigW( SC_HANDLE hService,
if( ( r == ERROR_SUCCESS ) && ( type == REG_SZ ) )
total += sz;
*pcbBytesNeeded = total;
/* if there's not enough memory, return an error */
if( total > *pcbBytesNeeded )
if( total > cbBufSize )
{
*pcbBytesNeeded = total;
SetLastError( ERROR_INSUFFICIENT_BUFFER );
return FALSE;
}
*pcbBytesNeeded = total;
ZeroMemory( lpServiceConfig, total );
sz = sizeof val;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment