From c998dd12a2dd0bd219ce0a68bdd9fcf82bb1c70e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 17 Jun 2009 11:18:26 +0000 Subject: Preparing for 2.0.12. --- g10/ChangeLog | 3 +++ g10/parse-packet.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'g10') diff --git a/g10/ChangeLog b/g10/ChangeLog index be083a6cd..e961921a1 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,8 @@ 2009-06-17 Werner Koch + * parse-packet.c (parse): Use a casted -1 instead of a 32 bit + constant to check for a garbled package. Fixes bug#1040. + * card-util.c (put_data_to_file, read_cert): New. (card_edit): Add command "readcert". (fetch_url): Allow code also for this gnupg major version 2. diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 324ab5e2e..a86e54981 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -501,8 +501,8 @@ parse( IOBUF inp, PACKET *pkt, int onlykeypkts, off_t *retpos, } } - if (pktlen == 0xffffffff) { - /* with a some probability this is caused by a problem in the + if (pktlen == (unsigned long)(-1)) { + /* With some probability this is caused by a problem in the * the uncompressing layer - in some error cases it just loops * and spits out 0xff bytes. */ log_error ("%s: garbled packet detected\n", iobuf_where(inp) ); -- cgit v1.2.3