[tor-dev] Failed test in UNICODE

Nick Mathewson nickm at alum.mit.edu
Wed Nov 30 18:22:57 UTC 2011


On Wed, Nov 23, 2011 at 11:02 AM, Gisle Vanem <gvanem at broadpark.no> wrote:
[...]
> ("Systemet finner ikke angitt fil" -> "System doesn't find specified file").
>
> I think the reason is that CreateProcessW() is used in common/util.c.
> The function is passed a 'const char *const filename'. Either we should
> always use CreateProcessA() or convert 'filename' using mbstowcs().
> What do you think?

So, in the rest of util.c it looks like we do a conditional mbstowcs()
before calling a Windows function that expects a TCHAR.   So we should
either do that, or have a wrapper function that does a conditional
mbstowcs or strlcpy depending on whether UNICODE is defined.

-- 
Nick


More information about the tor-dev mailing list