Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
binwalk
Commits
b54c893a
Commit
b54c893a
authored
8 years ago
by
Craig Heffner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added stricter validation of signature data types
parent
4ebb987c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
magic.py
src/binwalk/core/magic.py
+3
-1
No files found.
src/binwalk/core/magic.py
View file @
b54c893a
...
...
@@ -211,9 +211,11 @@ class SignatureLine(object):
self
.
fmt
=
'q'
self
.
size
=
8
# Assume 4 byte length for all other data types
el
se
:
el
if
self
.
type
in
[
'long'
,
'date'
]
:
self
.
fmt
=
'i'
self
.
size
=
4
else
:
raise
ParserException
(
"Unknown data type '
%
s' in line '
%
s'"
%
(
self
.
type
,
line
))
# The struct module uses the same characters for specifying signed and unsigned data types,
# except that signed data types are upper case. The above if-else code sets self.fmt to the
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment