index is 1-based at this point, index == line->nb_fields is the last
field and is valid.
This commit is contained in:
parent
074d9e4caf
commit
3ebeb2377f
|
@ -1700,7 +1700,7 @@ BOOL WINAPI SetupGetBinaryField( PINFCONTEXT context, DWORD index, BYTE *buffer,
|
||||||
SetLastError( ERROR_LINE_NOT_FOUND );
|
SetLastError( ERROR_LINE_NOT_FOUND );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!index || index >= line->nb_fields)
|
if (!index || index > line->nb_fields)
|
||||||
{
|
{
|
||||||
SetLastError( ERROR_INVALID_PARAMETER );
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1759,7 +1759,7 @@ BOOL WINAPI SetupGetMultiSzFieldA( PINFCONTEXT context, DWORD index, PSTR buffer
|
||||||
SetLastError( ERROR_LINE_NOT_FOUND );
|
SetLastError( ERROR_LINE_NOT_FOUND );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!index || index >= line->nb_fields)
|
if (!index || index > line->nb_fields)
|
||||||
{
|
{
|
||||||
SetLastError( ERROR_INVALID_PARAMETER );
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1808,7 +1808,7 @@ BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR buffe
|
||||||
SetLastError( ERROR_LINE_NOT_FOUND );
|
SetLastError( ERROR_LINE_NOT_FOUND );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (!index || index >= line->nb_fields)
|
if (!index || index > line->nb_fields)
|
||||||
{
|
{
|
||||||
SetLastError( ERROR_INVALID_PARAMETER );
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue