nwrote = -1;
goto ret;
}
- xstate->mem_output_buf = xrealloc(xstate->mem_output_buf, size);
+ xstate->mem_output_buf = xrealloc(xstate->mem_output_buf, size + 1);
memcpy(xstate->mem_output_buf + pos, buf, bufsize);
+ xstate->mem_output_buf[size] = '\0';
nwrote = bufsize;
} else {
nwrote = full_write(xstate->dst_fd, buf, bufsize);
USE_FOR_NOMMU(xstate->xformer_prog = "gunzip";)
goto found_magic;
}
+ if (ENABLE_FEATURE_SEAMLESS_Z
+ && magic.b16[0] == COMPRESS_MAGIC
+ ) {
+ xstate->xformer = unpack_Z_stream;
+ USE_FOR_NOMMU(xstate->xformer_prog = "uncompress";)
+ goto found_magic;
+ }
if (ENABLE_FEATURE_SEAMLESS_BZ2
&& magic.b16[0] == BZIP2_MAGIC
) {