Dscho, I've just pushed two patches to mob: - minor modifications to build with VS2005; - ability to install for the current user only.
It did not work with the remote.mob.url, you provided, failing with an error: fatal: '/git-cheetah.git': unable to chdir or not a git archive. So, I took the Push URL from http://repo.or.cz/w/git-cheetah.git. Hopefully, I did not break anything. On Jan 23, 7:42 am, Johannes Schindelin wrote: > $ git config remote.mob.url ssh://[EMAIL PROTECTED]/git-cheetah.git/ > $ git push mob master:mob Hannes, FYI: the root cause of my mistake lies in the fact that mbstowcs was called with a wrong length - it did not convert the terminating NULL, hence lstrcpyn copied garbage from tw. So, because lstrcpyn kind of protects better from the buffer overflow, I'll rework the change, but will keep lstrcpyn (sorry, Dscho, it seems in this case Win32 is just better). On Jan 23, 5:31 pm, Johannes Sixt <[EMAIL PROTECTED]> wrote: > On Wednesday 23 January 2008 02:11, Kirill wrote: > > @@ -185,9 +185,9 @@ static STDMETHODIMP get_command_string( > > LPWSTR tw = malloc((strlen(text)+1)*sizeof(wchar_t)); > > mbstowcs(tw,text, strlen(text)); > > if (flags & GCS_UNICODE) > > - lstrcpynW((LPWSTR)name, tw, size); > > + lstrcpynW((LPWSTR)name, tw, strlen(text)); > This is not correct for two reasons: > - You cannot derive the number of Unicode characters from the > result of strlen()... > - lstrcpyn() expects the maximum number of characters to copy > as the 3rd parameter, including the NUL character, and that must > be the space that is available. > Hence the original, size, is correct. > > BTW, lstrcpyn is much better than strncpy because it properly NUL > terminates the destination (and does not fill the buffer with NULs > if the source is short). As of the fix for DllRegisterServer, I'd rather just fix it to implement dynamic generation of the registry key (see NOTES). As of the PATH, Lode, unless you've already got the code, I'll write it. -- Kirill.
