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

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

View file

@ -1,3 +1,8 @@
2010-09-11 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_reset): Preserve context
pointer.
2010-09-11 Szymon Janc <szymon@janc.net.pl>
* grub-core/commands/lsacpi.c (grub_cmd_lsacpi): Fix prototype.

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;