mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-13 16:47:36 -06:00
verify-tag: also grok CR/LFs in the tag signature
On some people's favorite platform, gpg outputs signatures with CR/LF line endings. So verify-tag has to play nice with them. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1e61b7640d
commit
fec60a261d
@ -35,7 +35,7 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
|
|||||||
|
|
||||||
/* find the length without signature */
|
/* find the length without signature */
|
||||||
len = 0;
|
len = 0;
|
||||||
while (len < size && prefixcmp(buf + len, PGP_SIGNATURE "\n")) {
|
while (len < size && prefixcmp(buf + len, PGP_SIGNATURE)) {
|
||||||
eol = memchr(buf + len, '\n', size - len);
|
eol = memchr(buf + len, '\n', size - len);
|
||||||
len += eol ? eol - (buf + len) + 1 : size - len;
|
len += eol ? eol - (buf + len) + 1 : size - len;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user