[perl #8262] //g loops infinitely on tainted data
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index ceb521f..1b07e56 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -468,7 +468,10 @@ STATIC bool
 S_feature_is_enabled(pTHX_ char *name, STRLEN namelen)
 {
     HV * const hinthv = GvHV(PL_hintgv);
-    return (hinthv && hv_exists(hinthv, name, namelen));
+    char he_name[32] = "feature_";
+    (void) strncpy(&he_name[8], name, 24);
+    
+    return (hinthv && hv_exists(hinthv, he_name, 8 + namelen));
 }
 
 /*