From 4d0fc2632dfbda2bc549d47dc4b7437943e523ea Mon Sep 17 00:00:00 2001 From: Mariano Scasso <75589700+mscasso-scanoss@users.noreply.github.com> Date: Tue, 19 Dec 2023 09:03:17 -0300 Subject: [PATCH] 2.5.17 (#53) * solve bug extracting mz files. Remove duplicated function call * add mising SEEK_SET on miine function --------- Co-authored-by: scanossmining --- src/minr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/minr.c b/src/minr.c index e47ab19..b2b3da9 100644 --- a/src/minr.c +++ b/src/minr.c @@ -57,7 +57,7 @@ bool is_binary(char *data, long len) /* Is it a zip? */ if (*data == 'P' && data[1] == 'K' && data[2] < 9) return true; - + /* Does it contain a chr(0)? */ return (len != strlen(data)); } @@ -298,6 +298,7 @@ int load_file(struct minr_job *job, char *path) fseeko64(fp, 0, SEEK_END); job->src_ln = ftello64(fp); + fseeko64(fp, 0, SEEK_SET); if (job->src_ln <= 0) return FILE_IGNORED;