gpg-interface: do not hardcode the key string len anymore
authorHenning Schild <redacted>
Tue, 17 Jul 2018 12:50:10 +0000 (14:50 +0200)
committerJunio C Hamano <redacted>
Wed, 18 Jul 2018 17:02:20 +0000 (10:02 -0700)
commit42149d7f4b1424b29c0bae4f564d5f50a856bcea
tree960c1960971d40bd541a239fa51ffcefe05d396b
parent58af57e1c886a7c9fed7fb35f2dd8dd14cc5e4e0
gpg-interface: do not hardcode the key string len anymore

gnupg does print the keyid followed by a space and the signer comes
next. The same pattern is also used in gpgsm, but there the key length
would be 40 instead of 16. Instead of hardcoding the expected length,
find the first space and calculate it.
Input that does not match the expected format will be ignored now,
before we jumped to found+17 which might have been behind the end of an
unexpected string.

Signed-off-by: Henning Schild <redacted>
Signed-off-by: Junio C Hamano <redacted>
gpg-interface.c
git clone https://git.99rst.org/PROJECT