setupapi: Avoid debugstr buffer overflow.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-05-12 15:50:09 +02:00 committed by Alexandre Julliard
parent df05902b96
commit 88e28d971b
1 changed files with 2 additions and 7 deletions

View File

@ -1853,13 +1853,8 @@ BOOL WINAPI SetupGetBinaryField( PINFCONTEXT context, DWORD index, BYTE *buffer,
}
buffer[i - index] = value;
}
if (TRACE_ON(setupapi))
{
TRACE( "%p/%p/%d/%d index %d returning",
context->Inf, context->CurrentInf, context->Section, context->Line, index );
for (i = index; i < line->nb_fields; i++) TRACE( " %02x", buffer[i - index] );
TRACE( "\n" );
}
TRACE( "%p/%p/%d/%d index %d\n",
context->Inf, context->CurrentInf, context->Section, context->Line, index );
return TRUE;
}