gpg: Fix a NULL-deref in export due to invalid packet lengths.