Skip to content

Commit

Permalink
Accept an invalid file path value from the file picker
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-m authored and p1-mmr committed Dec 24, 2019
1 parent 9541c5a commit 259a32b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions extractors/from_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
desc = 'Extract Protobuf metadata from binary file (*.dll, *.so...)')
def walk_binary(binr):
if type(binr) == str:
with open(binr, 'rb') as fd:
binr = fd.read()
try:
with open(binr, 'rb') as fd:
binr = fd.read()
except Exception:
return

# Search for:
# ".proto" or ".protodevel", as part of the "name" (1) field
Expand Down

0 comments on commit 259a32b

Please sign in to comment.