summaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2002-09-10 10:40:12 +0200
committerWerner Koch <wk@gnupg.org>2002-09-10 10:40:12 +0200
commitb324a5d2d14c33bdd4549b2e84f189d4ef0cabe6 (patch)
tree580a40b65f6957a56573812edf355f3c666aa38f /g10/photoid.c
parentAdded prototype. (diff)
downloadgnupg2-b324a5d2d14c33bdd4549b2e84f189d4ef0cabe6.tar.xz
gnupg2-b324a5d2d14c33bdd4549b2e84f189d4ef0cabe6.zip
Cleanups and minor fixes.
Diffstat (limited to 'g10/photoid.c')
-rw-r--r--g10/photoid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index 138ecd6ca..c20e20eca 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -59,7 +59,8 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
for(i=4;i<16;i++) /* The reserved bytes */
header[i]=0;
- uid=m_alloc_clear(sizeof(*uid)+50);
+#define EXTRA_UID_NAME_SPACE 71
+ uid=m_alloc_clear(sizeof(*uid)+71);
printf(_("\nPick an image to use for your photo ID. "
"The image must be a JPEG file.\n"
@@ -117,7 +118,7 @@ PKT_user_id *generate_photo_id(PKT_public_key *pk)
/* Build the packet */
build_attribute_subpkt(uid,1,photo,len,header,16);
parse_attribute_subpkts(uid);
- make_attribute_uidname(uid);
+ make_attribute_uidname(uid, EXTRA_UID_NAME_SPACE);
/* Showing the photo is not safe when noninteractive since the
"user" may not be able to dismiss a viewer window! */