g10: Allow User ID length >= 256.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 1 Jun 2016 11:59:09 +0000 (20:59 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 1 Jun 2016 12:04:41 +0000 (21:04 +0900)
* build-packet.c (do_user_id): Call write_header2 with HDRLEN not set.

--

Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
GnuPG-bug-id: 2374
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
g10/build-packet.c

index 4bfc2ac..1353a86 100644 (file)
@@ -329,7 +329,7 @@ do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
     }
   else
     {
-      write_header2( out, ctb, uid->len, 2 );
+      write_header2( out, ctb, uid->len, 0 );
       rc = iobuf_write( out, uid->name, uid->len );
     }
   return rc;