1OTS-VALIDATOR-CHECKER(1) User Commands OTS-VALIDATOR-CHECKER(1)
2
3
4
6 ots-validator-checker - font validation checker
7
9 ots-validator-checker FONT_FILE
10
12 ots-validator-checker is a program which is intended to validate mal‐
13 formed fonts. If the program detects that the font is invalid, it
14 prints “OK” and returns with 0 (success). If it couldn’t detect any
15 errors, the program then opens the transcoded font and renders some
16 characters using FreeType:
17
18 transcoded_font = ValidateAndTranscode(malicious_font);
19 if (validation_error)
20 Print("OK");
21 OpenAndRenderSomeCharacters(transcoded_font); # may cause SIGSEGV
22 Print("OK");
23
24 If SEGV doesn’t raise inside FreeType library, the program prints “OK”
25 and returns with 0 as well. You should run this tool under the catch‐
26 segv(1) or valgrind(1) command so that you can easily verify that all
27 transformed fonts don’t crash the library (see the example below).
28
30 $ for f in malformed/*.ttf ; do catchsegv ./ots-validator-checker "$f" ; done
31 OK: the malicious font was filtered: malformed/1.ttf
32 OK: the malicious font was filtered: malformed/2.ttf
33 OK: FreeType2 didn't crash: malformed/3.ttf
34 OK: the malicious font was filtered: malformed/4.ttf
35
37 Report bugs to <https://github.com/khaledhosny/ots/issues>
38
40 ots-idempotent(1), ots-perf(1), ots-sanitize(1), ots-side-by-side(1)
41
42
43
44OpenType Sanitizer May 2021 OTS-VALIDATOR-CHECKER(1)