Page MenuHome GnuPG

truncated uid display with gpg --edit-key --no-utf8-strings --charset iso-8859-1
Closed, ResolvedPublic

Description

Release: GnuPG 1.2.1

Environment

SuSE Linux 8.1 on Pentium II
GnuPG 1.2.1 as downloaded from www.gnupg.org
idea.c put in the ciphers directory

Reproduced with AIX 5.1 on IBM RS/6000.

Description

With a PGP2 test key, running "gpg --charset iso-8859-1 --no-utf8-strings --quiet --yes --edit-key 'Rainer Perske <rainer.perske@uni-muenster.de>' creates a list of UIDs where those UIDs containing 8-bit characters are displayed truncated, e.g.
...
(2) Rainer der Gro\xdf\x65 Bruder <rainer@persk
...
This line should read:
(2) Rainer der Gro\xdf\x65 Bruder <rainer@perske.net>
It is truncated exactly 6 characters before its end.
Thus obviously, when the output length is calculated, it is forgotten to take the \x-encoding into account.

Either the \x-encoding should not be done, or the length calculation should take the encoding into account.

(I've set the severity to serious instead of non-critical because this wrong display breaks the key trust editing routines of my e-mail program.)

How To Repeat

I have created my test key with PGP 2.6.3in.
To include 8-bit characters in the userid, I had to compile PGP with -funsigned-char, otherwise a bug in
prohibits including 8-bit characters.
I did not test it with GnuPG generated keys.

Fix

Fixed in 1.2.2.

Event Timeline

Fixed. Note however, that PGP 2.x does not properly handle
8-bit characters in user IDs. User IDs are supposed to be
UTF8. That said, GnuPG should be displaying the entire
string, and that has been fixed.

dshaw claimed this task.
dshaw added a subscriber: werner.