Skip to content

Commit

Permalink
leaking_addresses: do not parse binary files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tcharding committed Apr 6, 2018
1 parent 1410fe4 commit e2858ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/leaking_addresses.pl
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ sub parse_file
return;
}

if (! -T $file) {
return;
}

if (skip_parse($file)) {
dprint "skipping file: $file\n";
return;
Expand Down

0 comments on commit e2858ca

Please sign in to comment.