gpg: Prevent an invalid memory read using a garbled keyring.