gpg: Fix type mismatch resulting in a buffer overflow.