GetCPInfo should return FALSE if called with NULL info buffer.

This commit is contained in:
Ulrich Czekalla 2005-03-19 17:04:56 +00:00 committed by Alexandre Julliard
parent e10b58425f
commit 11f2cb1877
1 changed files with 8 additions and 2 deletions

View File

@ -1302,9 +1302,15 @@ BOOL WINAPI IsDBCSLeadByte( BYTE testchar )
*/
BOOL WINAPI GetCPInfo( UINT codepage, LPCPINFO cpinfo )
{
const union cptable *table = get_codepage_table( codepage );
const union cptable *table;
if (!table)
if (!cpinfo)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
if (!(table = get_codepage_table( codepage )))
{
switch(codepage)
{