diff --git a/Makefile.in b/Makefile.in index 9186537..d013488 100644 --- a/Makefile.in +++ b/Makefile.in @@ -435,10 +435,12 @@ $(PROG): $(LIB) $(PROGOBJS) ./buildtmp/$(PROG) test: all (cd test; ulimit -c unlimited; sh ./run_test.sh $(TESTSUITE) ) 2>&1 | tee test.log -clean: +topclean: $(RM) buildtmp/$(PROG) $(OBJS) $(PROGOBJS) $(BAKFILES) $(LIB) $(LIB).$(LIBVER) $(RM) test.log $(RM_RF) test/datafiles + +clean: topclean (cd @LIBARCHIVE_DIR@; make clean) [ "x@ENABLE_WAVPACK@" != "x" ] && (cd @WAVPACK_DIR@; make clean) exit 0 diff --git a/archive/pc_archive.c b/archive/pc_archive.c index 3a7ca2c..bf9a710 100644 --- a/archive/pc_archive.c +++ b/archive/pc_archive.c @@ -645,6 +645,14 @@ add_pathname(const char *fpath, const struct stat *sb, int i; char *dot; + /* + * Paranoid check (Well, we can have a sparse file of any size ...). + * When sorting pathnames, we can't handle files close to INT64_MAX size. + */ + if (sb->st_size > INT64_MAX - 255) { + log_msg(LOG_ERR, 0, "%s:\nCannot handle files > %lld bytes when sorting!", + fpath, INT64_MAX - 255); + } basename = &fpath[ftwbuf->base]; if (a_state.srt_pos == SORT_BUF_SIZE) { struct sort_buf *srt; diff --git a/utils/phash/extensions.h b/utils/phash/extensions.h index 8f7f2da..9c33ddf 100644 --- a/utils/phash/extensions.h +++ b/utils/phash/extensions.h @@ -227,5 +227,7 @@ struct ext_entry { {"sed" , TYPE_TEXT, 3}, {"mailmap" , TYPE_TEXT, 7}, {"sin" , TYPE_BINARY, 3}, + {"xul" , TYPE_TEXT, 3}, + {"xpt" , TYPE_BINARY, 3}, }; #endif diff --git a/utils/phash/extensions.txt b/utils/phash/extensions.txt index 075d16d..03a8057 100644 --- a/utils/phash/extensions.txt +++ b/utils/phash/extensions.txt @@ -217,3 +217,5 @@ charset,TYPE_TEXT sed,TYPE_TEXT mailmap,TYPE_TEXT sin,TYPE_BINARY +xul,TYPE_TEXT +xpt,TYPE_BINARY diff --git a/utils/phash/phash.c b/utils/phash/phash.c index 2d4f8cd..15e0989 100644 --- a/utils/phash/phash.c +++ b/utils/phash/phash.c @@ -12,14 +12,14 @@ /* small adjustments to _a_ to make values distinct */ ub1 tab[] = { -0,0,87,120,113,125,22,125,0,0,0,220,125,0,131,7, -0,0,183,125,82,113,0,131,146,87,125,183,0,7,146,183, -0,0,0,253,183,0,131,113,253,168,0,220,0,7,0,113, -82,0,7,131,145,7,0,0,120,113,0,183,220,183,220,22, -0,183,0,183,113,0,183,120,22,27,125,125,233,124,125,235, -253,131,146,235,15,220,0,235,0,235,212,220,220,220,183,132, -87,125,113,82,220,32,229,235,131,27,0,220,237,113,4,132, -0,0,145,0,148,195,0,253,142,88,66,232,137,135,167,0, +0,0,87,235,113,131,120,120,113,85,0,220,125,0,131,7, +0,0,183,125,82,183,0,131,253,125,125,183,0,7,85,183, +0,0,0,145,183,0,131,113,253,183,0,220,0,7,0,113, +82,0,7,113,125,220,0,0,168,113,0,183,220,183,220,22, +0,183,0,235,113,0,183,82,22,27,125,253,142,124,125,235, +232,131,146,235,146,220,0,235,0,220,220,220,113,220,183,135, +87,125,113,220,220,32,229,97,131,40,0,184,237,113,148,184, +0,0,145,0,241,167,0,145,88,88,184,242,57,135,174,0, }; /* The hash function */ diff --git a/utils/phash/phash.h b/utils/phash/phash.h index d55e30b..ff33f22 100644 --- a/utils/phash/phash.h +++ b/utils/phash/phash.h @@ -8,7 +8,7 @@ extern ub1 tab[]; #define PHASHLEN 0x80 /* length of hash mapping table */ -#define PHASHNKEYS 216 /* How many keys were hashed */ +#define PHASHNKEYS 218 /* How many keys were hashed */ #define PHASHRANGE 256 /* Range any input might map to */ #define PHASHSALT 0x9e3779b9 /* internal, initialize normal hash */