Skip to content

Commit

Permalink
Add test case for potential integer overflow in OT layout code (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV authored Nov 9, 2024
1 parent f49d8f3 commit 7386be4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/custom/bugs.tests
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tests/fonts/rb_custom/NotoSansCJK.subset1.otf;--direction rtl;U+4F60,U+597D,U+FF0C;
tests/fonts/rb_custom/OpenSans.subset1.ttf;--variations=wght=500,wdth=80;U+0065;
tests/fonts/rb_custom/NotoSansMalayalam.subset1.ttf;;U+0D38,U+0D4D,U+0D25;
Binary file not shown.
12 changes: 12 additions & 0 deletions tests/shaping/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ fn bugs_002() {
);
}

#[test]
fn bugs_003() {
assert_eq!(
shape(
"tests/fonts/rb_custom/NotoSansMalayalam.subset1.ttf",
"\u{0D38}\u{0D4D}\u{0D25}",
"",
),
"gid7=0+1891"
);
}

#[test]
fn fuzzer_001() {
assert_eq!(
Expand Down

0 comments on commit 7386be4

Please sign in to comment.