When provided with a large quantity of files/data, femtozip gets into an infinite loop. This issue can be tracked down to the insert(int, int*, int*, size_t) method in IntSet.h.
inline int insert(int n, int *b, int *end, size_t capacity) {
int *p = b + (n % capacity);
while (*p != -1) {
if (*p == n) {
return 0;
}
p++;
if (p == end) {
p = b;
}
}
*p = n;
return 1;
}
The loop while (*p != -1) never completes as p is never equal to -1 or n.
When provided with a large quantity of files/data, femtozip gets into an infinite loop. This issue can be tracked down to the
insert(int, int*, int*, size_t)
method inIntSet.h
.The loop
while (*p != -1)
never completes asp
is never equal to-1
orn
.