Skip to content

Commit

Permalink
Increase buffer size for libarchive
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jul 6, 2018
1 parent 1e3eaf8 commit d95424f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ccutil/tessdatamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool TessdataManager::LoadArchiveFile(const char *filename) {
if (a != nullptr) {
archive_read_support_filter_all(a);
archive_read_support_format_all(a);
if (archive_read_open_filename(a, filename, 4096) == ARCHIVE_OK) {
if (archive_read_open_filename(a, filename, 8192) == ARCHIVE_OK) {
archive_entry *ae;
while (archive_read_next_header(a, &ae) == ARCHIVE_OK) {
const char *component = archive_entry_pathname(ae);
Expand All @@ -97,6 +97,9 @@ bool TessdataManager::LoadArchiveFile(const char *filename) {
}
}
result = is_loaded_;
} else {
tprintf("archive_read_open_filename(...,%s,...) failed, %s\n",
filename, strerror(archive_errno(a)));
}
archive_read_free(a);
}
Expand Down

0 comments on commit d95424f

Please sign in to comment.