mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-05 21:50:20 +00:00
8149714: [parfait] char array lengths don't match in awt_Font.cpp:1701
Reviewed-by: serb, ssadetsky
This commit is contained in:
parent
3ed86431ba
commit
74dbca3167
@ -1679,6 +1679,8 @@ CSegTable* CSegTableManager::GetTable(LPCWSTR lpszFontName, BOOL fEUDC)
|
||||
|
||||
CSegTableManager g_segTableManager;
|
||||
|
||||
#define KEYLEN 16
|
||||
|
||||
class CCombinedSegTable : public CSegTableComponent
|
||||
{
|
||||
public:
|
||||
@ -1689,7 +1691,7 @@ public:
|
||||
private:
|
||||
LPSTR GetCodePageSubkey();
|
||||
void GetEUDCFileName(LPWSTR lpszFileName, int cchFileName);
|
||||
static char m_szCodePageSubkey[16];
|
||||
static char m_szCodePageSubkey[KEYLEN];
|
||||
static WCHAR m_szDefaultEUDCFile[_MAX_PATH];
|
||||
static BOOL m_fEUDCSubKeyExist;
|
||||
static BOOL m_fTTEUDCFileExist;
|
||||
@ -1697,7 +1699,7 @@ private:
|
||||
CEUDCSegTable* m_pEUDCSegTable;
|
||||
};
|
||||
|
||||
char CCombinedSegTable::m_szCodePageSubkey[16] = "";
|
||||
char CCombinedSegTable::m_szCodePageSubkey[KEYLEN] = "";
|
||||
|
||||
WCHAR CCombinedSegTable::m_szDefaultEUDCFile[_MAX_PATH] = L"";
|
||||
|
||||
@ -1729,8 +1731,11 @@ LPSTR CCombinedSegTable::GetCodePageSubkey()
|
||||
}
|
||||
lpszCP++; // cf lpszCP = "932"
|
||||
|
||||
char szSubKey[80];
|
||||
char szSubKey[KEYLEN];
|
||||
strcpy(szSubKey, "EUDC\\");
|
||||
if ((strlen(szSubKey) + strlen(lpszCP)) >= KEYLEN) {
|
||||
return NULL;
|
||||
}
|
||||
strcpy(&(szSubKey[strlen(szSubKey)]), lpszCP);
|
||||
strcpy(m_szCodePageSubkey, szSubKey);
|
||||
return m_szCodePageSubkey;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user