Problem: Syntax highlighting a Yaml file causes a crash. (Blake Preston)
Solution: Copy the pim structure before calling addstate() to avoid it
becoming invalide when the state list is reallocated.
if (add_state != NULL)
{
nfa_pim_T *pim;
+ nfa_pim_T pim_copy;
if (t->pim.result == NFA_PIM_UNUSED)
pim = NULL;
pim = NULL;
}
+ /* If "pim" points into l->t it will become invalid when
+ * adding the state causes the list to be reallocated. Make a
+ * local copy to avoid that. */
+ if (pim == &t->pim)
+ {
+ copy_pim(&pim_copy, pim);
+ pim = &pim_copy;
+ }
+
if (add_here)
addstate_here(thislist, add_state, &t->subs, pim, &listidx);
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 51,
/**/
50,
/**/