[svn] GnuPG - r5045 - branches/STABLE-BRANCH-1-4/g10
svn author wk
cvs at cvs.gnupg.org
Wed Jun 17 12:36:12 CEST 2009
Author: wk
Date: 2009-06-17 12:36:12 +0200 (Wed, 17 Jun 2009)
New Revision: 5045
Modified:
branches/STABLE-BRANCH-1-4/g10/ChangeLog
branches/STABLE-BRANCH-1-4/g10/parse-packet.c
Log:
Fix bug#1040.
Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog 2009-06-17 10:19:50 UTC (rev 5044)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog 2009-06-17 10:36:12 UTC (rev 5045)
@@ -1,3 +1,8 @@
+2009-06-17 Werner Koch <wk at g10code.com>
+
+ * 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 <dshaw at jabberwocky.com>
* gpg.c (main): Remove Camellia restriction.
Modified: branches/STABLE-BRANCH-1-4/g10/parse-packet.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/parse-packet.c 2009-06-17 10:19:50 UTC (rev 5044)
+++ branches/STABLE-BRANCH-1-4/g10/parse-packet.c 2009-06-17 10:36:12 UTC (rev 5045)
@@ -441,8 +441,8 @@
}
}
- 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) );
More information about the Gnupg-commits
mailing list