-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMORX-34.html
More file actions
39 lines (37 loc) · 1.58 KB
/
Copy pathMORX-34.html
File metadata and controls
39 lines (37 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:ft="https://github.com/OpenType/fonttest"
xmlns:xlink="http://www.w3.org/1999/xlink">
<body>
<h3 id="MORX-34">MORX-34: Inserting a Billion Laughs</h3>
<div class="desc">
The <a href="../fonts/TestMORXThirtyfour.ttf">font</a> for this
test case is an AAT version of the
<a href="https://en.wikipedia.org/wiki/Billion_laughs_attack">Billion
laughs attack</a>. It contains
an <a href="https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6morx.html"
>AAT Extended Glyph Metamorphosis Table</a> with nine
identical <em>Glyph Insertion Subtables</em> whose embedded
finite-state machine inserts the
string <em>hahahahahahahahahaha</em> for every <em>a</em> in the
input string. If the input is “ha” (one single laugh), the first
subtable rewrites it to 10 laughs. The second subtable rewrites 10
to 100 laughs; the third goes from 100 to 1000; the fourth from 1000
to 10,000. After executing the ninth subtable, the final result
will be a billion laughs, but this will take a very long time (and
large amounts of memory) to compute. Your implementation should
neither crash nor hang under attack. See also
<a href="https://github.com/foliojs/fontkit/issues/174">fontkit bug 174</a>.
</div>
<table>
<tr>
<th>Expected</th>
<td class="expected-no-crash" ft:id="MORX-34/1" ft:render="ha"
ft:font="TestMORXThirtyfour.ttf">Shouldn’t crash</td>
</tr>
<tr>
<th class="conformance-header">Conformance</th>
<td class="conformance" ft:id="MORX-34/1"/>
</tr>
</table>
</body>
</html>