[Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es
Bart
bartjunk64 at gmail.com
Fri Apr 1 22:09:11 CEST 2016
On 4/1/16, Denis Kozlov <dezlov at gmail.com> wrote:
> This issue also affects Lazarus 1.6 and FPC 3.0+.
>
> GetWindowsSpecialDir in FPC 3.0.0 and trunk has severe encoding and buffer
> overrun issues. SHGetFolderPath links to SHGetFolderPathW if
> FPC_UNICODE_RTL is defined. But GetWindowsSpecialDir still calls it as
> SHGetFolderPathA, passing under-sized PChar buffer instead of PWideChar.
GetAppConfigDirUTF8 on Windows uses SHGetFolderPathW directly and then
does Utf16ToUtf8 on the result.
Bypassig the GetWindowsSpecialDir in fpc completely.
(revision 43495 by bart, Thu Nov 28 18:37:44 2013)
Bart
More information about the Lazarus
mailing list