On 1 April 2016 at 21:09, Bart <bartjun...@gmail.com> wrote:

> On 4/1/16, Denis Kozlov <dez...@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
>


Yes, Lazarus 1.7 uses SHGetFolderPath directly. Lazarus 1.6 fixes branch
still uses GetWindowsSpecialDir.

This patch should fix GetWindowsSpecialDir, GetAppConfigDir
and GetAppConfigFile in FPC:
http://bugs.freepascal.org/view.php?id=29942

Maybe LCL can then use FPC's implementation?

Denis
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to