File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21491,7 +21491,9 @@ SV *
2149121491Perl_re_intuit_string(pTHX_ REGEXP * const r)
2149221492{ /* Assume that RE_INTUIT is set */
2149321493 /* Returns an SV containing a string that must appear in the target for it
21494- * to match */
21494+ * to match, or NULL if nothing is known that must match.
21495+ *
21496+ * CAUTION: the SV can be freed during execution of the regex engine */
2149521497
2149621498 struct regexp *const prog = ReANY(r);
2149721499 DECLARE_AND_GET_RE_DEBUG_FLAGS;
@@ -25078,6 +25080,12 @@ S_handle_names_wildcard(pTHX_ const char * wname, /* wildcard name to match */
2507825080 /* Compile the subpattern consisting of the name being looked for */
2507925081 subpattern_re = compile_wildcard(wname, wname_len, FALSE /* /-i */ );
2508025082 must = re_intuit_string(subpattern_re);
25083+
25084+ /* (Note: 'must' could contain a NUL. And yet we use strspn() below on it.
25085+ * This works because the NUL causes the function to return early, thus
25086+ * showing that there are characters in it other than the acceptable ones,
25087+ * which is our desired result.) */
25088+
2508125089 prog = ReANY(subpattern_re);
2508225090
2508325091 /* If only nothing is matched, skip to where empty names are looked for */
You can’t perform that action at this time.
0 commit comments