8000 Add a fuzz target for `_elementtree.XMLParser._parse_whole` (#111477) · Glyphack/cpython@4f54ecb · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f54ecb

Browse files
bradlarsenGlyphack
authored andcommitted
Add a fuzz target for _elementtree.XMLParser._parse_whole (python#111477)
* Add a fuzzer for `_elementtree.XMLParser._parse_whole`
1 parent f68bae3 commit 4f54ecb

File tree

60 files changed

+623
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+623
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
tok_1="<"
2+
tok_2=">"
3+
tok_3="/"
4+
tok_4="<![CDATA["
5+
tok_5="]]>"
6+
tok_6="<?xml"
7+
tok_6a="?>"
8+
tok_7="version"
9+
tok_8="encoding"
10+
tok_9="UTF-8"
11+
tok_9a="UTF-16"
12+
tok_9b="ASCII"
13+
tok_9c="LATIN-1"
14+
tok_9d="UTF-32"
15+
tok_9e="UTF-7"
16+
tok_10="\""
17+
tok_11="&"
18+
tok_11a="&#"
19+
tok_11b=";"
20+
tok_12="'"
21+
tok_13="<!--"
22+
tok_13a="-->"
23+
tok_14="</"
24+
tok_15="="
25+
tok_16="&gt;"
26+
tok_17="&lt;"
27+
tok_18="&amp;"
28+
tok_19="&apos;"
29+
tok_20="&quot;"
30+
tok_21="&#20013;"
31+
tok_22="&#x4e2d;"
32+
tok_23="&#0;"
33+
tok_24="<!ENTITY"
34+
tok_25="SYSTEM"
35+
tok_26="PUBLIC"
36+
tok_27="NDATA"
37+
tok_28="["
38+
tok_29="]"
39+
tok_30="\\"
40+
tok_30a="\\x00"
41+
tok_31="0"
42+
tok_32="1"
43+
tok_33="2"
44+
tok_34="3"
45+
tok_35="4"
46+
tok_36="5"
47+
tok_37="6"
48+
tok_38="7"
49+
tok_39="8"
50+
tok_40="9"
51+
tok_41="iso8859_1"
52+
tok_42="latin_1"
53+
tok_43="us.ascii"
54+
tok_43a="us_ascii"
55+
tok_43b="ascii"
56+
tok_44="xml:"
57+
tok_45="surrogate"
58+
tok_46="replace"
59+
tok_47="strict"
60+
61+
attr_encoding=" encoding=\"1\""
62+
attr_generic=" a=\"1\""
63+
attr_href=" href=\"1\""
64+
attr_standalone=" standalone=\"no\""
65+
attr_version=" version=\"1\""
66+
attr_xml_base=" xml:base=\"1\""
67+
attr_xml_id=" xml:id=\"1\""
68+
attr_xml_lang=" xml:lang=\"1\""
69+
attr_xml_space=" xml:space=\"1\""
70+
attr_xmlns=" xmlns=\"1\""
71+
72+
entity_builtin="&lt;"
73+
entity_decimal="&#1;"
74+
entity_external="&a;"
75+
entity_hex="&#x1;"
76+
77+
string_any="ANY"
78+
string_brackets="[]"
79+
string_cdata="CDATA"
80+
string_col_fallback=":fallback"
81+
string_col_generic=":a"
82+
string_col_include=":include"
83+
string_dashes="--"
84+
string_empty="EMPTY"
85+
string_empty_dblquotes="\"\""
86+
string_empty_quotes="''"
87+
string_entities="ENTITIES"
88+
string_entity="ENTITY"
89+
string_fixed="#FIXED"
90+
string_id="ID"
91+
string_idref="IDREF"
92+
string_idrefs="IDREFS"
93+
string_implied="#IMPLIED"
94+
string_nmtoken="NMTOKEN"
95+
string_nmtokens="NMTOKENS"
96+
string_notation="NOTATION"
97+
string_paren 10000 theses="()"
98+
string_pcdata="#PCDATA"
99+
string_percent="%a"
100+
string_public="PUBLIC"
101+
string_required="#REQUIRED"
102+
string_schema=":schema"
103+
string_system="SYSTEM"
104+
string_ucs4="UCS-4"
105+
string_utf16="UTF-16"
106+
string_utf8="UTF-8"
107+
string_xmlns="xmlns:"
108+
109+
tag_attlist="<!ATTLIST"
110+
tag_cdata="<![CDATA["
111+
tag_close="</a>"
112+
tag_doctype="<!DOCTYPE"
113+
tag_element="<!ELEMENT"
114+
tag_entity="<!ENTITY"
115+
tag_ignore="<![IGNORE["
116+
tag_include="<![INCLUDE["
117+
tag_notation="<!NOTATION"
118+
tag_open="<a>"
119+
tag_open_close="<a />"
120+
tag_open_exclamation="<!"
121+
tag_open_q="<?"
122+
tag_sq2_close="]]>"
123+
tag_xml_q="<?xml?>"
124+
125+
encoding_utf="UTF-"
126+
encoding_iso1="ISO-8859"
127+
encoding_iso3="ISO-10646-UCS"
128+
encoding_iso5="ISO-LATIN-1"
129+
encoding_jis="SHIFT_JIS"
130+
encoding_utf7="UTF-7"
131+
encoding_utf16le="UTF-16BE"
132+
encoding_utf16le="UTF-16LE"
133+
encoding_ascii="US-ASCII"
134+
encoding_latin1="latin1"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:IgnoreComments>true</c14n2:IgnoreComments>
3+
</dsig:CanonicalizationMethod>
4+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
</dsig:CanonicalizationMethod>
3+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:PrefixRewrite>sequential</c14n2:PrefixRewrite>
3+
</dsig:CanonicalizationMethod>
4+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:PrefixRewrite>sequential</c14n2:PrefixRewrite>
3+
<c14n2:QNameAware>
4+
<c14n2:QualifiedAttr Name="type" NS="http://www.w3.org/2001/XMLSchema-instance"/>
5+
</c14n2:QNameAware>
6+
</dsig:CanonicalizationMethod>
7+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:PrefixRewrite>sequential</c14n2:PrefixRewrite>
3+
<c14n2:QNameAware>
4+
<c14n2:Element Name="bar" NS="http://a"/>
5+
<c14n2:XPathElement Name="IncludedXPath" NS="http://www.w3.org/2010/xmldsig2#"/>
6+
</c14n2:QNameAware>
7+
</dsig:CanonicalizationMethod>
8+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1 8000 +
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:QNameAware>
3+
<c14n2:QualifiedAttr Name="type" NS="http://www.w3.org/2001/XMLSchema-instance"/>
4+
</c14n2:QNameAware>
5+
</dsig:CanonicalizationMethod>
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:QNameAware>
3+
<c14n2:Element Name="bar" NS="http://a"/>
4+
</c14n2:QNameAware>
5+
</dsig:CanonicalizationMethod>
6+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:QNameAware>
3+
<c14n2:Element Name="bar" NS="http://a"/>
4+
<c14n2:XPathElement Name="IncludedXPath" NS="http://www.w3.org/2010/xmldsig2#"/>
5+
</c14n2:QNameAware>
6+
</dsig:CanonicalizationMethod>
7+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<dsig:CanonicalizationMethod xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:c14n2="http://www.w3.org/2010/xml-c14n2" Algorithm="http://www.w3.org/2010/xml-c14n2">
2+
<c14n2:TrimTextNodes>true</c14n2:TrimTextNodes>
3+
</dsig:CanonicalizationMethod>
4+

0 commit comments

Comments
 (0)
0