1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* build-packet.c (write_header2): If a suggested header length is provided

along with a zero length, interpret this as an actual zero length packet
and not as an indeterminate length packet. (do_comment, do_user_id): Use
it here as these packets might be naturally zero length.

* parse-packet.c (parse): Show packet type when failing due to an
indeterminate length packet.

* misc.c (parse_options): Only provide args for the true (i.e. not
"no-xxx") form of options.
This commit is contained in:
David Shaw 2004-02-15 00:04:32 +00:00
parent c9aa5000d7
commit 95d05215c3
4 changed files with 58 additions and 36 deletions

View file

@ -1,6 +1,6 @@
/* parse-packet.c - read packets
* Copyright (C) 1998, 1999, 2000, 2001, 2002,
* 2003 Free Software Foundation, Inc.
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
* 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -383,11 +383,11 @@ parse( IOBUF inp, PACKET *pkt, int onlykeypkts, off_t *retpos,
case PKT_COMPRESSED:
break; /* the orginal pgp 2 way. */
default:
log_error ("%s: old style partial length "
"for invalid packet type\n", iobuf_where(inp) );
rc = G10ERR_INVALID_PACKET;
goto leave;
default:
log_error ("%s: old style partial length for invalid"
" packet type %d\n", iobuf_where(inp), pkttype );
rc = G10ERR_INVALID_PACKET;
goto leave;
}
}
else {