aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-06-17 10:36:12 +0000
committerWerner Koch <[email protected]>2009-06-17 10:36:12 +0000
commit275ad3fa26dc70f9110965dbef8dab4e1e389ea0 (patch)
treeb24fb91b6684019f7a3b6cdcf31a5c41765d61f0
parent* Makefile.am (gpgkeys_hkp_LDADD): Need DNSLIBS for the resolver now (diff)
downloadgnupg-275ad3fa26dc70f9110965dbef8dab4e1e389ea0.tar.gz
gnupg-275ad3fa26dc70f9110965dbef8dab4e1e389ea0.zip
Fix bug#1040.
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/parse-packet.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index fd5b3c367..c1b0085ed 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-17 Werner Koch <[email protected]>
+
+ * parse-packet.c (parse): Use a casted -1 instead of a 32 bit
+ constant to check for a garbled package. Fixes bug#1040.
+
2009-06-05 David Shaw <[email protected]>
* gpg.c (main): Remove Camellia restriction.
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index c614ca264..60ca8af72 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -441,8 +441,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) );