瀏覽代碼

leaking_addresses: do not parse binary files

Currently script parses binary files.  Since we are scanning for
readable kernel addresses there is no need to parse binary files.  We
can use Perl to check if file is binary and skip parsing it if so.

Do not parse binary files.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Tobin C. Harding 7 年之前
父節點
當前提交
e2858caddc
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scripts/leaking_addresses.pl

+ 4 - 0
scripts/leaking_addresses.pl

@@ -462,6 +462,10 @@ sub parse_file
 		return;
 	}
 
+	if (! -T $file) {
+		return;
+	}
+
 	if (skip_parse($file)) {
 		dprint "skipping file: $file\n";
 		return;