[flac-dev] Patch to add Unicode filename support for win32 flac
lrn1986 at gmail.com
Tue Mar 19 10:13:42 PDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
On 19.03.2013 20:35, Janne Hyvärinen wrote:
> On 19.3.2013 15:49, JonY wrote:
>> On 3/19/2013 19:59, Janne Hyvärinen wrote:
>>> On 18.3.2013 12:25, Erik de Castro Lopo wrote:
>>>> JonY wrote:
>>>>> Before anyone does anything, see __wgetmainargs
>>>>> It can expand wildcards. Since it already provides
>>>>> argc/argv/env, it is more a less a drop-in replacement for
>>>>> the main() arguments.
>>> Alright, here's a patch utilizing this function. There's a lot
>>> of changes here. Project files have a new configuration called
>>> "Release (UTF8)", intended to be used when building the command
>>> line tools. This project has the required UTF-8 define in place
>>> so all libraries expect things in encoded format. Regular Debug
>>> and Release configurations do not use any new tricks so
>>> existing projects won't break when compiled with those
>>> I'm at work and couldn't do extensive testing, but command line
>>> FLAC.exe seems to perform everything right with this.
>>> Metaflac probably requires some minor tweaks but I wanted to
>>> show some progress so that 1.3 doesn't slip out the door while
>>> I'm busy.
>> As for calling __wgetmainargs, I have some concerns about the
>> security implications: LoadLibrary("msvcrt.dll") <- Which msvcrt?
>> Theoretical security exploit.
> There is msvcrt.dll in the System32 dir in all supported Windows
> systems. That is what the function targets, but of course
> LoadLibrary searches from exe's dir first. I think security exploit
> concerns are warrantless, if you can place malicious replacement
> c-runtime dll in the exe's path you have already won.
See  for the info. According to that article,
LoadLibraryA("msvcrt.dll") should be perfectly safe.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the flac-dev