From d8bce478be3ae9e401841a77d189ef3c81ccb757 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 1 Jul 2016 15:18:59 +0200 Subject: gpg: Make sure a user ID packet has always a terminating Nul in memory. * g10/keygen.c (write_uid): Avoid overflow. -- Also the actual length if the user ID is given by LEN, using NAME diretcly is often more convenient. --- g10/packet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g10/packet.h') diff --git a/g10/packet.h b/g10/packet.h index 0ff28c82b..a496c4b21 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -293,7 +293,7 @@ typedef struct } flags; /* The text contained in the user id packet, which is normally the name and email address of the key holder (See RFC 4880 5.11). - (Serialized.) */ + (Serialized.). For convenience an extra Nul is always appended. */ char name[1]; } PKT_user_id; -- cgit v1.2.3