aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2018-02-18 18:22:15 -0500
committerTobin C. Harding <me@tobin.cc>2018-04-06 18:50:34 -0400
commite2858caddc71f61521254a5359d17d058d6dda08 (patch)
treea6c21d1398063df21b7ee095697acde0a5c3557d
parent1410fe4eea22959bd31c05e4c1846f1718300bde (diff)
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>
-rwxr-xr-xscripts/leaking_addresses.pl4
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
462 return; 462 return;
463 } 463 }
464 464
465 if (! -T $file) {
466 return;
467 }
468
465 if (skip_parse($file)) { 469 if (skip_parse($file)) {
466 dprint "skipping file: $file\n"; 470 dprint "skipping file: $file\n";
467 return; 471 return;