X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/ce8be6edbed5c435a8f957781a26e6f9eac6fcec..f1e930585a5eb8ef184f5a0ad1e85759e01e60d0:/parsekey.c diff --git a/parsekey.c b/parsekey.c index a498f4c..4482d8b 100644 --- a/parsekey.c +++ b/parsekey.c @@ -5,7 +5,7 @@ * * Copyright 2002 Project Purple * - * $Id: parsekey.c,v 1.17 2003/10/11 21:52:18 noodles Exp $ + * $Id: parsekey.c,v 1.19 2004/05/27 18:42:22 noodles Exp $ */ #include @@ -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 += 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 = curchar; + curpacket->packet->length += curchar; } } else { curpacket->packet->tag = (curchar & 0x3C) >> 2; @@ -292,6 +292,7 @@ int read_openpgp_stream(int (*getchar_func)(void *ctx, size_t count, } else { logthing(LOGTHING_ERROR, "Unexpected character: 0x%X", curchar); + rc = 1; } }