mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-05 16:46:35 -05:00
The fixed-size data pool used by LoadLanguageData() in src/Common/Language.c stores the embedded English XML strings plus the selected language's XML strings. When AddPoolData() returns NULL because the 1 MB DATA_POOL_CAPACITY is exhausted, LoadLanguageData() aborts and returns FALSE. The callers ignore the return value, so the dictionary is left partially populated: later XML entries (many controls, warnings and newer dialogs) are missing while earlier entries, including most menu items, remain translated. Since 1.26.24 the XML language files have grown enough that several languages now overflow the pool (e.g. Corsican, French, German and Dutch). Increase DATA_POOL_CAPACITY in src/Common/Dictionary.h from 1 MB to 4 MB to accommodate current and near-future translations. This regression only affects the Windows version, which uses the Win32/C localization path with this fixed pool. Linux and macOS use wxWidgets/wxTranslations and do not use src/Common/Dictionary.c for GUI localization. Fixes: GH-1587
35 lines
910 B
C
35 lines
910 B
C
/*
|
|
Derived from source code of TrueCrypt 7.1a, which is
|
|
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
|
by the TrueCrypt License 3.0.
|
|
|
|
Modifications and additions to the original source code (contained in this file)
|
|
and all other portions of this file are Copyright (c) 2013-2026 AM Crypto
|
|
and are governed by the Apache License 2.0 the full text of which is
|
|
contained in the file License.txt included in VeraCrypt binary and source
|
|
code distribution packages.
|
|
*/
|
|
|
|
#ifndef DICTIONARY_H
|
|
#define DICTIONARY_H
|
|
|
|
#include <windows.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define DATA_POOL_CAPACITY 4000000
|
|
|
|
void AddDictionaryEntry (char *key, int intKey, void *value);
|
|
void *GetDictionaryValue (const char *key);
|
|
void *GetDictionaryValueByInt (int intKey);
|
|
void *AddPoolData (void *data, size_t dataSize);
|
|
void ClearDictionaryPool ();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|