]> git.sommitrealweird.co.uk Git - onak.git/commitdiff
cscvs to tla changeset 131
authorJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:48:24 +0000 (23:48 +0000)
committerJonathan McDowell <noodles@earth.li>
Mon, 31 May 2004 23:48:24 +0000 (23:48 +0000)
Author: noodles
Date: 2004/05/27 18:42:22
Silly bug fix for new format packet lengths.

parsekey.c

index 5c6b3207801d48f583e05de44229d0377e2544d2..4482d8bc008d07a20330366a050f34a7033dee10 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright 2002 Project Purple
  *
  *
  * Copyright 2002 Project Purple
  *
- * $Id: parsekey.c,v 1.18 2004/01/04 18:47:35 noodles Exp $
+ * $Id: parsekey.c,v 1.19 2004/05/27 18:42:22 noodles Exp $
  */
 
 #include <assert.h>
  */
 
 #include <assert.h>
@@ -225,13 +225,13 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count,
                                        curpacket->packet->length = curchar;
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
                                        curpacket->packet->length = curchar;
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
-                                       curpacket->packet->length = curchar;
+                                       curpacket->packet->length += curchar;
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
-                                       curpacket->packet->length = curchar;
+                                       curpacket->packet->length += curchar;
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
                                        curpacket->packet->length <<= 8;
                                        rc = getchar_func(ctx, 1, &curchar);
-                                       curpacket->packet->length = curchar;
+                                       curpacket->packet->length += curchar;
                                }
                        } else {
                                curpacket->packet->tag = (curchar & 0x3C) >> 2;
                                }
                        } else {
                                curpacket->packet->tag = (curchar & 0x3C) >> 2;