From: Martin Mares Date: Fri, 16 Jul 2004 21:56:11 +0000 (+0000) Subject: Fixed two bugs in parsing of buckets (one of them introduced by me a couple X-Git-Tag: holmes-import~933 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ca8e6a79a3c6bccca81a7f2a108f381824485d87;p=libucw.git Fixed two bugs in parsing of buckets (one of them introduced by me a couple of hours ago, the other aged). --- diff --git a/lib/buck2obj.c b/lib/buck2obj.c index cce821db..2adf6e77 100644 --- a/lib/buck2obj.c +++ b/lib/buck2obj.c @@ -108,7 +108,7 @@ buck2obj_parse(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fas { while (btell(body) < end && bgets(body, buf, sizeof(buf))) if (buf[0]) - obj_add_attr(o_hdr, buf[0], buf+1); + obj_add_attr(o_body, buf[0], buf+1); ASSERT(btell(body) == end); } } @@ -128,7 +128,7 @@ buck2obj_parse(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fas ptr = buf->bb.ptr; copied = 1; } - end = ptr + len; + end = ptr + buck_len; byte *start = ptr; ptr = decode_attributes(ptr, end, o_hdr, 0); // header