break;
}
}
+ if (flip->n_vars <= 0)
+ goto error;
flip->file = pool_create_temp_file (flip->pool);
if (flip->file == NULL)
}
*cp = '\0';
+ if (strlen (name) == 0)
+ {
+ free (name);
+ name = xstrdup ("v");
+ }
+
/* Use the mangled name, if it is available, or add numeric
extensions until we find one that is. */
- if (!dict_create_var (dict, name, 0))
+ if (!id_is_plausible (name, false) || !dict_create_var (dict, name, 0))
{
int len = strlen (name);
int i;
strncpy (n, name, ofs);
sprintf (&n[ofs], "%d", i);
- if (dict_create_var (dict, n, 0))
+ if (id_is_plausible (n, false) && dict_create_var (dict, n, 0))
break;
}
}