You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Szakmeister <jo...@szakmeister.net> on 2004/12/05 02:43:35 UTC

Re: libsvn_subr/cmdline.c "GetModuleFileNameA" change - further nitpicks

On Monday 29 November 2004 07:36, Max Bowsher wrote:
> I have no Windows build environment, so I'm not committing these
> directly, for lack of ability to test the build.
>
> * No longer necessary to #include <mbctype.h> now we no longer use
> _getmbcp().
>
> * The current use of "lstrlenA (ansi_path)" will cause the value of
> "*ucs2_path" to be MISSING A TERMINATING NULL. Change the lstrlenA()
> call to a simple constant -1 to have MultiByteToWideChar convert
> up-to-and-including the terminating null.
>
> * Why use lstrlenW() to get the length of the string, when the various
> functions called will return the number of characters written anyway?
>
> * Error handling is lax - if GetModuleFileNameW and MultiByteToWideChar
> fail, then ucs2_path could be used uninitialized.

Check out r12157 and r12158 for fixes to all of the above.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org