]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed two bugs in parsing of buckets (one of them introduced by me a couple
authorMartin Mares <mj@ucw.cz>
Fri, 16 Jul 2004 21:56:11 +0000 (21:56 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 16 Jul 2004 21:56:11 +0000 (21:56 +0000)
of hours ago, the other aged).

lib/buck2obj.c

index cce821dbde858e7c3f9e9021a85227d52f960113..2adf6e77da4fe27f8afc370c328e618e73546538 100644 (file)
@@ -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