Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: third_party/ots/test/test_malicious_fonts.sh

Issue 775893002: Updating OTS repo from https://github.com/khaledhosny/ots.git (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating with 4800 warning fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/bin/bash
2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Usage: ./test_malicious_fonts.sh [ttf_or_otf_file_name]
8
9 BASE_DIR=~/malicious/
10 CHECKER=./validator-checker
11
12 if [ ! -x "$CHECKER" ] ; then
13 echo "$CHECKER is not found."
14 exit 1
15 fi
16
17 if [ $# -eq 0 ] ; then
18 # No font file is specified. Apply this script to all TT/OT files under the
19 # BASE_DIR.
20 if [ ! -d $BASE_DIR ] ; then
21 echo "$BASE_DIR does not exist."
22 exit 1
23 fi
24
25 # Recursively call this script.
26 find $BASE_DIR -type f -name '*tf' -exec "$0" {} \;
27 echo
28 exit 0
29 fi
30
31 if [ $# -gt 1 ] ; then
32 echo "Usage: $0 [ttf_or_otf_file_name]"
33 exit 1
34 fi
35
36 # Confirm that the malicious font file does not crash OTS nor OS font renderer.
37 base=`basename "$1"`
38 "$CHECKER" "$1" > /dev/null 2>&1 || (echo ; echo "\nFAIL: $1 (Run $CHECKER $1 fo r more information.)")
39 echo -n "."
OLDNEW
« no previous file with comments | « third_party/ots/test/table_dependencies_test.cc ('k') | third_party/ots/test/test_unmalicious_fonts.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698