mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
regexp: Avoid dangling start/stop pointers in atom
States could be eliminated later, so set start/stop pointers to NULL after they're used in xmlFAGenerateTransitions.
This commit is contained in:
@@ -1094,8 +1094,6 @@ xmlRegPrintAtom(FILE *output, xmlRegAtomPtr atom) {
|
|||||||
fprintf(output, "%d entries\n", atom->nbRanges);
|
fprintf(output, "%d entries\n", atom->nbRanges);
|
||||||
for (i = 0; i < atom->nbRanges;i++)
|
for (i = 0; i < atom->nbRanges;i++)
|
||||||
xmlRegPrintRange(output, atom->ranges[i]);
|
xmlRegPrintRange(output, atom->ranges[i]);
|
||||||
} else if (atom->type == XML_REGEXP_SUBREG) {
|
|
||||||
fprintf(output, "start %d end %d\n", atom->start->no, atom->stop->no);
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(output, "\n");
|
fprintf(output, "\n");
|
||||||
}
|
}
|
||||||
@@ -1615,6 +1613,9 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
atom->start = NULL;
|
||||||
|
atom->start0 = NULL;
|
||||||
|
atom->stop = NULL;
|
||||||
if (xmlRegAtomPush(ctxt, atom) < 0)
|
if (xmlRegAtomPush(ctxt, atom) < 0)
|
||||||
return(-1);
|
return(-1);
|
||||||
return(0);
|
return(0);
|
||||||
|
Reference in New Issue
Block a user