diff options
author | Tobin C. Harding <me@tobin.cc> | 2018-02-19 00:22:15 +0100 |
---|---|---|
committer | Tobin C. Harding <me@tobin.cc> | 2018-04-07 00:50:34 +0200 |
commit | e2858caddc71f61521254a5359d17d058d6dda08 (patch) | |
tree | a6c21d1398063df21b7ee095697acde0a5c3557d /scripts | |
parent | leaking_addresses: add 32-bit support (diff) | |
download | linux-e2858caddc71f61521254a5359d17d058d6dda08.tar.xz linux-e2858caddc71f61521254a5359d17d058d6dda08.zip |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/leaking_addresses.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl index 05906f6cf6b9..3d5c3096aac8 100755 --- a/scripts/leaking_addresses.pl +++ b/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; |