#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.94 2016/04/19 13:39:19 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.95 2016/04/19 23:36:36 christos Exp $")
#endif
#include "magic.h"
continue;
nsz = nbytes;
urv = uncompressbuf(fd, ms->bytes_max, i, buf, &newbuf, &nsz);
- DPRINTF("uncompressbuf = %d, %s, %zu\n", rv, (char *)newbuf,
+ DPRINTF("uncompressbuf = %d, %s, %zu\n", urv, (char *)newbuf,
nsz);
switch (urv) {
case OKDATA:
goto error;
if ((pb = file_push_buffer(ms)) == NULL)
goto error;
+ /*
+ * XXX: If file_buffer fails here, we overwrite
+ * the compressed text. FIXME.
+ */
if (file_buffer(ms, -1, NULL, buf, nbytes) == -1)
goto error;
if ((rbuf = file_pop_buffer(ms, pb)) != NULL) {