Lines Matching refs:temp

163 	} temp;
174 * Fill s->temp by copying data starting from b->in[b->in_pos]. Caller
175 * must have set s->temp.pos to indicate how much data we are supposed
176 * to copy into s->temp.buf. Return true once s->temp.pos has reached
177 * s->temp.size.
182 b->in_size - b->in_pos, s->temp.size - s->temp.pos);
184 memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size);
186 s->temp.pos += copy_size;
188 if (s->temp.pos == s->temp.size) {
189 s->temp.pos = 0;
444 if (! memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
457 s->crc32->write(hash_context,s->temp.buf + HEADER_MAGIC_SIZE, 2);
462 readhash[0] = s->temp.buf[HEADER_MAGIC_SIZE + 5];
463 readhash[1] = s->temp.buf[HEADER_MAGIC_SIZE + 4];
464 readhash[2] = s->temp.buf[HEADER_MAGIC_SIZE + 3];
465 readhash[3] = s->temp.buf[HEADER_MAGIC_SIZE + 2];
477 if (s->temp.buf[HEADER_MAGIC_SIZE] != 0
478 || s->temp.buf[HEADER_MAGIC_SIZE + 1] >= ARRAY_SIZE (hashes)
479 || (hashes[s->temp.buf[HEADER_MAGIC_SIZE + 1]].name == 0
480 && s->temp.buf[HEADER_MAGIC_SIZE + 1] != 0))
483 s->hash_id = s->temp.buf[HEADER_MAGIC_SIZE + 1];
494 if (s->temp.buf[HEADER_MAGIC_SIZE + 1])
496 s->hash_size = hashes[s->temp.buf[HEADER_MAGIC_SIZE + 1]].size;
498 s->hash = grub_crypto_lookup_md_by_name (hashes[s->temp.buf[HEADER_MAGIC_SIZE + 1]].name);
553 if (! memeq(s->temp.buf + 10, FOOTER_MAGIC, FOOTER_MAGIC_SIZE))
564 s->crc32->write(hash_context,s->temp.buf + 4, 6);
569 readhash[0] = s->temp.buf[3];
570 readhash[1] = s->temp.buf[2];
571 readhash[2] = s->temp.buf[1];
572 readhash[3] = s->temp.buf[0];
586 if ((s->index.size >> 2) != get_le32(s->temp.buf + 4))
590 if (s->temp.buf[8] != 0 || s->temp.buf[9] != s->hash_id)
607 * Validate the CRC32. We know that the temp buffer is at least
610 s->temp.size -= 4;
619 s->crc32->write(hash_context,s->temp.buf, s->temp.size);
624 readhash[3] = s->temp.buf[s->temp.size];
625 readhash[2] = s->temp.buf[s->temp.size + 1];
626 readhash[1] = s->temp.buf[s->temp.size + 2];
627 readhash[0] = s->temp.buf[s->temp.size + 3];
635 s->temp.pos = 2;
642 if (s->temp.buf[1] & 0x3E)
644 if (s->temp.buf[1] & 0x3F)
649 if (s->temp.buf[1] & 0x40) {
650 if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
660 if (s->temp.buf[1] & 0x80) {
661 if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size)
672 s->bcj_active = s->temp.buf[1] & 0x01;
674 if (s->temp.size - s->temp.pos < 2)
677 ret = xz_dec_bcj_reset(s->bcj, s->temp.buf[s->temp.pos++]);
685 if (s->temp.buf[s->temp.pos++] != 0x00)
691 if (s->temp.size - s->temp.pos < 2)
695 if (s->temp.buf[s->temp.pos++] != 0x21)
699 if (s->temp.buf[s->temp.pos++] != 0x01)
703 if (s->temp.size - s->temp.pos < 1)
706 ret = xz_dec_lzma2_reset(s->lzma2, s->temp.buf[s->temp.pos++]);
711 while (s->temp.pos < s->temp.size)
712 if (s->temp.buf[s->temp.pos++] != 0x00)
715 s->temp.pos = 0;
736 * Stream Header is copied to s->temp, and then
771 s->temp.size = s->block_header.size;
772 s->temp.pos = 0;
871 s->temp.size = STREAM_HEADER_SIZE;
1010 s->temp.pos = 0;
1011 s->temp.size = STREAM_HEADER_SIZE;