Skip to content

Commit 7386be4

Browse files
authored
Add test case for potential integer overflow in OT layout code (#144)
1 parent f49d8f3 commit 7386be4

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

tests/custom/bugs.tests

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
tests/fonts/rb_custom/NotoSansCJK.subset1.otf;--direction rtl;U+4F60,U+597D,U+FF0C;
22
tests/fonts/rb_custom/OpenSans.subset1.ttf;--variations=wght=500,wdth=80;U+0065;
3+
tests/fonts/rb_custom/NotoSansMalayalam.subset1.ttf;;U+0D38,U+0D4D,U+0D25;
Binary file not shown.

tests/shaping/custom.rs

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ fn bugs_002() {
2828
);
2929
}
3030

31+
#[test]
32+
fn bugs_003() {
33+
assert_eq!(
34+
shape(
35+
"tests/fonts/rb_custom/NotoSansMalayalam.subset1.ttf",
36+
"\u{0D38}\u{0D4D}\u{0D25}",
37+
"",
38+
),
39+
"gid7=0+1891"
40+
);
41+
}
42+
3143
#[test]
3244
fn fuzzer_001() {
3345
assert_eq!(

0 commit comments

Comments
 (0)