* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_reset): Preserve context

pointer.
This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2010-09-12 13:50:24 +02:00
1 parent 3c70f225b2
commit 788f1f3a85
2 files changed
+14 -2

No files matched your search

+9 -2
View File
@@ -830,8 +830,15 @@ void xz_dec_reset(struct xz_dec *s)
s->allow_buf_error = false;
s->pos = 0;
memzero(&s->block, sizeof(s->block));
memzero(&s->index, sizeof(s->index));
{
uint8_t *t;
t = s->block.hash.crc32_context;
memzero(&s->block, sizeof(s->block));
s->block.hash.crc32_context = t;
t = s->index.hash.crc32_context;
memzero(&s->index, sizeof(s->index));
s->index.hash.crc32_context = t;
}
s->temp.pos = 0;
s->temp.size = STREAM_HEADER_SIZE;