aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-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) );