else if (r.compression == COMP_ZLIB)
read_zlib_compressed_data (&r);
+ free (r.var_widths);
+
fclose (r.file);
}
read_string (r, encoding, count + 1);
printf ("%08llx: Character Encoding: %s\n", posn, encoding);
+
+ free (encoding);
}
static void
size_t n_bytes = size * count;
char *buffer = xmalloc (n_bytes + 1);
read_bytes (r, buffer, n_bytes);
- buffer[size] = '\0';
+ buffer[n_bytes] = '\0';
text->reader = r;
text->buffer = buffer;
text->size = n_bytes;