01-19-2021, 06:47 AM
Yeah, I just wrote this little test and it works OK.
The real thing has 5 MB of data, too much to post.
Code:
/*
Show the bug
*/
#include <string.h>
#include <stdio.h>
char testdata[] = "foo xyzzy <tag> nonsense <label> junk more junk";
int main(void) {
if (strstr(testdata,"<tag>") == NULL)
printf("tag not found\n");
else
printf("tag found\n");
if (strstr(testdata,"<label>") == NULL)
printf("label not found\n");
else
printf("label found\n");
return 0;
}