diff --git a/lib/lar.c b/lib/lar.c index 325a3e1517..7a497dc989 100644 --- a/lib/lar.c +++ b/lib/lar.c @@ -172,7 +172,7 @@ int process_file(const struct mem_file *archive, void *where) #endif /* zeroes */ if (archive->compression == 3) { - memset(archive->start, 0, archive->reallen); + memset(where, 0, archive->reallen); return 0; } printk(BIOS_INFO, "LAR: Compression algorithm #%i not supported!\n", archive->compression); diff --git a/util/lar/stream.c b/util/lar/stream.c index 7de58da65e..0b9f766189 100644 --- a/util/lar/stream.c +++ b/util/lar/stream.c @@ -148,7 +148,6 @@ int output_elf_segments(struct lar *lar, char *name, char *filebuf, continue; } thisalgo = zeroes; - thisalgo = algo; if (verbose()) fprintf(stderr, "New section addr %#x size %#x\n", (u32)shdr[i].sh_addr, (u32)shdr[i].sh_size);