aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-06-17 11:18:26 +0000
committerWerner Koch <[email protected]>2009-06-17 11:18:26 +0000
commitc998dd12a2dd0bd219ce0a68bdd9fcf82bb1c70e (patch)
tree11be2c0a6cb5cd0fee8ff31436d72f56074fda40 /g10
parentUse cancel button in confirmation only if requested. (diff)
downloadgnupg-c998dd12a2dd0bd219ce0a68bdd9fcf82bb1c70e.tar.gz
gnupg-c998dd12a2dd0bd219ce0a68bdd9fcf82bb1c70e.zip
Preparing for 2.0.12.gnupg-2.0.12
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog3
-rw-r--r--g10/parse-packet.c4
2 files changed, 5 insertions, 2 deletions
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 <[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.
+
* 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) );