->link[x][0] wasn't being initialised. I wonder how this ever works.
valgrind wonders why I never asked it before.
Signed-off-by: NeilBrown <neil@brown.name>
Bugs to be fixed
----------------
+- [ ] search for "\s" loops infinitely.
- [ ] email: urls should not be followed unless they are visible.
Maybe display in the message window, which might be made larger
just for this purpose.
abort();
cnt += 1;
i = st->link[active][i];
+ if (i >= len)
+ abort();
} while (i);
for (i = 0; i < len; i++)
if (st->link[active][i] == NO_LINK ||
st->ignorecase = calloc(BITSET_SIZE(len), sizeof(*st->ignorecase));
st->active = 0;
st->match = -1;
+ if (!st->backtrack) {
+ st->link[0][0] = 0;
+ st->link[1][0] = 0;
+ }
for (i = 1; i < len; i++) {
if (rxl[i] == REC_IGNCASE)
ic = True;
if (ic)
set_bit(i, st->ignorecase);
if (!st->backtrack) {
- st->link[0][i] = i ? NO_LINK : 0;
- st->link[1][i] = i ? NO_LINK : 0;
+ st->link[0][i] = NO_LINK;
+ st->link[1][i] = NO_LINK;
}
}