1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-04 03:08:57 +02:00

Solved conflict

This commit is contained in:
Werner Koch 2002-03-03 14:08:39 +00:00
parent fbc66185f8
commit 6587b15a59
2 changed files with 27 additions and 12 deletions

View File

@ -96,6 +96,10 @@
* hkp.c (parse_hkp_index): Bug fix - don't report non-revoked keys * hkp.c (parse_hkp_index): Bug fix - don't report non-revoked keys
as revoked in HKP key searches. as revoked in HKP key searches.
2002-02-19 Werner Koch <wk@gnupg.org>
* parse-packet.c (parse_trust): Made parsing more robust.
2002-02-19 David Shaw <dshaw@jabberwocky.com> 2002-02-19 David Shaw <dshaw@jabberwocky.com>
* hkp.c (parse_hkp_index): Catch corruption in HKP index lines * hkp.c (parse_hkp_index): Catch corruption in HKP index lines

View File

@ -1881,23 +1881,34 @@ parse_comment( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *packet )
static void static void
parse_trust( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *pkt ) parse_trust( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *pkt )
{ {
int c; int c;
c = iobuf_get_noeof(inp); if (pktlen)
pkt->pkt.ring_trust = m_alloc( sizeof *pkt->pkt.ring_trust ); {
pkt->pkt.ring_trust->trustval = c; c = iobuf_get_noeof(inp);
pkt->pkt.ring_trust->sigcache = 0; pktlen--;
if (!c && pktlen==2) { pkt->pkt.ring_trust = m_alloc( sizeof *pkt->pkt.ring_trust );
c = iobuf_get_noeof (inp); pkt->pkt.ring_trust->trustval = c;
/* we require that bit 7 of the sigcache is 0 (easier eof handling)*/ pkt->pkt.ring_trust->sigcache = 0;
if ( !(c & 0x80) ) if (!c && pktlen==1)
{
c = iobuf_get_noeof (inp);
pktlen--;
/* we require that bit 7 of the sigcache is 0 (easier eof handling)*/
if ( !(c & 0x80) )
pkt->pkt.ring_trust->sigcache = c; pkt->pkt.ring_trust->sigcache = c;
} }
if( list_mode ) if( list_mode )
printf(":trust packet: flag=%02x sigcache=%02x\n", printf(":trust packet: flag=%02x sigcache=%02x\n",
pkt->pkt.ring_trust->trustval, pkt->pkt.ring_trust->trustval,
pkt->pkt.ring_trust->sigcache); pkt->pkt.ring_trust->sigcache);
}
else
{
if( list_mode )
printf(":trust packet: empty\n");
}
skip_rest (inp, pktlen);
} }