Hello everybody,

It is totally possible that I missed a group/list/site, dedicated to
Git-Cheetah project. If so, could you please point me in the right
direction?

Long story short, I came up with three patches, but have slim-to-none
idea what to do with them [besides bugging the whole msysGit group].
Could somebody explain me what to do next? Please, note that I'm using
Git but only for local projects (which basically means that most of
"push to a branch", "sub-module" & co. is totally foreign language to
me; well... truth to be told, English is a foreign language to me too
:)

Also, I've got couple more questions.
1. It seems like the code is mixing C Run-Time and Win32 API. Is there
a reason to not settle with one set of API? E.g. mbstowcs is in CRT,
lstrcpynW is in Win32; why not strncpy?

2. Could someone please review the following patch (size is the size
of a string buffer, passed to IContextMenu::GetCommandString):
diff --git a/menu.c b/menu.c
index 544be7e..53a1190 100644
--- a/menu.c
+++ b/menu.c
@@ -185,9 +185,9 @@ static STDMETHODIMP get_command_string(void *p, UINT id,
                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));
                else
-                       lstrcpynA(name, text, size);
+                       lstrcpynA(name, text, strlen(text));
                free(tw);
                return S_OK;
        }

Thank you very much for your attention!
Hoping for your help and understanding,

Kirill.

Attachment: 0001-Fix-an-attempt-to-respond-to-DllRegisterServer.patch
Description: Binary data

Attachment: 0002-Minor-modifications-to-get-a-clean-build-under-VS200.patch
Description: Binary data

Attachment: 0003-Add-ability-to-install-for-the-current-user-only.patch
Description: Binary data

Reply via email to