{"thread":{"id":"9763","subject":"[PATCH] verify-tag: also grok CR/LFs in the tag signature","startedAt":"2007-09-03T16:51:43Z","lastAt":"2007-09-03T16:51:43Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"52365","messageId":"Pine.LNX.4.64.0709031749110.28586@racer.site","threadId":"9763","inReplyTo":null,"subject":"[PATCH] verify-tag: also grok CR/LFs in the tag signature","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-09-03T16:51:43Z","receivedAt":"2007-09-03T16:51:43Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nOn some people's favorite platform, gpg outputs signatures\nwith CR/LF line endings.  So verify-tag has to play nice with\nthem.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tI just pushed a fix to 4msysgit.git which prevents the generation \n\tof such tag signatures, but it's always better to be a little more \n\tgraceful.\n\n\tNote that the match less strict than before, but if you really \n\thave to start a line in a signed tag with that magic BEGIN \n\tPGP SIGNATURE string, you cannot be helped anyway.\n\n builtin-verify-tag.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-verify-tag.c b/builtin-verify-tag.c\nindex 5c1314d..8cfefcf 100644\n--- a/builtin-verify-tag.c\n+++ b/builtin-verify-tag.c\n@@ -35,7 +35,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)\n \n \t/* find the length without signature */\n \tlen = 0;\n-\twhile (len < size && prefixcmp(buf + len, PGP_SIGNATURE \"\\n\")) {\n+\twhile (len < size && prefixcmp(buf + len, PGP_SIGNATURE)) {\n \t\teol = memchr(buf + len, '\\n', size - len);\n \t\tlen += eol ? eol - (buf + len) + 1 : size - len;\n \t}\n-- \n1.5.3.2.g46909\n"}]}