mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* keyedit.c (sign_uids): Allow replacing expired signatures. Allow
duplicate signatures with --expert. * pkclist.c (check_signatures_trust): Don't display a null fingerprint when checking a signature with --always-trust enabled. * filter.h (progress_filter_context_t), progress.c (handle_progress): Fix compiler warnings. Make "what" constant. * build-packet.c (do_plaintext): Do not create invalid literal packets with >255-byte names.
This commit is contained in:
parent
048a078fc6
commit
338be86caf
6 changed files with 73 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/* build-packet.c - assemble packets and write them
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998-2003 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -539,6 +539,12 @@ do_plaintext( IOBUF out, int ctb, PKT_plaintext *pt )
|
|||
byte buf[1000]; /* this buffer has the plaintext! */
|
||||
int nbytes;
|
||||
|
||||
/* Truncate namelen to the maximum 255 characters. This does mean
|
||||
that a function that calls build_packet with an illegal literal
|
||||
packet will get it back legalized. */
|
||||
if(pt->namelen>255)
|
||||
pt->namelen=255;
|
||||
|
||||
write_header(out, ctb, calc_plaintext( pt ) );
|
||||
iobuf_put(out, pt->mode );
|
||||
iobuf_put(out, pt->namelen );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue