Merge pull request #1741 from keymanapp/windows-comapi-buffer-overrun-in-getdefaultkeyboardid-64-10.0

[Windows] [10.0] Fix FieldWorks LT-19402, buffer overrun in GetDefaultKeyboardID for 64 bit
This commit is contained in:
Marc Durdin 2019-04-24 15:28:11 +07:00 committed by GitHub
commit f16872a998
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -57,7 +57,7 @@ function GetKeyboardIconFileName(const KeyboardFileName: string): string; // I
function GetKeymanInstallPath: string;
function GetDefaultHKL: HKL; // I3581 // I3619 // I3619
function GetDefaultKeyboardID: Cardinal; // I4169
function GetDefaultKeyboardID: HKL; // I4169
var
FInstallingKeyman: Boolean = False;
@ -306,7 +306,7 @@ begin
Result := 0;
end;
function GetDefaultKeyboardID: Cardinal; // I4169
function GetDefaultKeyboardID: HKL; // I4169
const
BaseKeyboardID_USEnglish: Integer = $00000409;
begin

View file

@ -60,7 +60,7 @@ implementation
{$IFDEF KLOGGING}
uses
Variants, Windows, SysUtils, ErrorControlledRegistry, SystemDebugPath, VersionInfo, Unicode;
Variants, Windows, SysUtils, ErrorControlledRegistry, ErrLogPath, VersionInfo, Unicode;
{$ENDIF}
@ -91,7 +91,7 @@ var
FRootPath: string;
begin
inherited Create;
FRootPath := GetSystemDebugPath;
FRootPath := GetErrLogPath;
FMethodStack := TStringList.Create;
GetModuleFileName(hInstance, buf, 260); FAppName := buf;