{"thread":{"id":"5345","subject":"[PATCH] git-mv: fix off-by-one error","startedAt":"2006-08-21T20:22:25Z","lastAt":"2006-08-21T20:22:25Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25705","messageId":"Pine.LNX.4.63.0608212221500.28360@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5345","inReplyTo":null,"subject":"[PATCH] git-mv: fix off-by-one error","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-08-21T20:22:25Z","receivedAt":"2006-08-21T20:22:25Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nEmbarassing.\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n\n\tThis bug made t7001-mv.sh fail with the patch in\n\thttp://article.gmane.org/gmane.comp.version-control.git/25647\n\twhen XMALLOC_POISON was set, which was probably the reason it\n\twas not yet applied...\n\n builtin-mv.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-mv.c b/builtin-mv.c\nindex 6e7062b..ff882be 100644\n--- a/builtin-mv.c\n+++ b/builtin-mv.c\n@@ -26,7 +26,7 @@ static const char **copy_pathspec(const \n \t\tif (length > 0 && result[i][length - 1] == '/') {\n \t\t\tchar *without_slash = xmalloc(length);\n \t\t\tmemcpy(without_slash, result[i], length - 1);\n-\t\t\twithout_slash[length] = '\\0';\n+\t\t\twithout_slash[length - 1] = '\\0';\n \t\t\tresult[i] = without_slash;\n \t\t}\n \t\tif (base_name) {\n-- \n1.4.2.gc69d\n"}]}