imagehlp: improve last error handling in ImageGetCertificateData
Juan Lang
juan.lang at gmail.com
Tue Dec 11 09:14:03 CST 2007
Hi Aric,
- if( !Certificate )
+ if( *RequiredLength < size )
{
*RequiredLength = size;
- return TRUE;
+ SetLastError( ERROR_INSUFFICIENT_BUFFER );
+ return FALSE;
}
- if( *RequiredLength < size )
+ if( !Certificate )
{
*RequiredLength = size;
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- return FALSE;
+ return TRUE;
}
Are you sure this is the order that *RequiredLength and Certificate
are checked in? Seems backwards to the normal style to me. I won't
bug you for a proper regression test, as I failed to produce one too
:)
--Juan
More information about the wine-devel
mailing list