Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
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
open-source
jadx
Commits
c5994f95
Commit
c5994f95
authored
Jul 16, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix NPE in signature parser (#313)
parent
03a09deb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
ClassNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
+6
-6
SignatureParser.java
...main/java/jadx/core/dex/nodes/parser/SignatureParser.java
+6
-0
No files found.
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
View file @
c5994f95
...
...
@@ -192,23 +192,23 @@ public class ClassNode extends LineAttrNode implements ILoadable, IDexNode {
break
;
}
}
}
catch
(
JadxRuntime
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Class signature parse error: {}"
,
this
,
e
);
}
}
private
void
setFieldsTypesFromSignature
()
{
for
(
FieldNode
field
:
fields
)
{
SignatureParser
sp
=
SignatureParser
.
fromNode
(
field
);
if
(
sp
!=
null
)
{
try
{
try
{
SignatureParser
sp
=
SignatureParser
.
fromNode
(
field
);
if
(
sp
!=
null
)
{
ArgType
gType
=
sp
.
consumeType
();
if
(
gType
!=
null
)
{
field
.
setType
(
gType
);
}
}
catch
(
JadxRuntimeException
e
)
{
LOG
.
error
(
"Field signature parse error: {}"
,
field
,
e
);
}
}
catch
(
Exception
e
)
{
LOG
.
error
(
"Field signature parse error: {}.{}"
,
this
.
getFullName
(),
field
.
getName
(),
e
);
}
}
}
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/parser/SignatureParser.java
View file @
c5994f95
...
...
@@ -180,6 +180,9 @@ public class SignatureParser {
next
();
// type parsing not completed, proceed to inner class
ArgType
inner
=
consumeObjectType
(
true
);
if
(
inner
==
null
)
{
throw
new
JadxRuntimeException
(
"No inner type found: "
+
debugString
());
}
return
ArgType
.
genericInner
(
genericType
,
inner
.
getObject
(),
inner
.
getGenericTypes
());
}
else
{
consume
(
';'
);
...
...
@@ -289,6 +292,9 @@ public class SignatureParser {
}
private
String
debugString
()
{
if
(
pos
>=
sign
.
length
())
{
return
sign
;
}
return
sign
+
" at position "
+
pos
+
" ('"
+
sign
.
charAt
(
pos
)
+
"')"
;
}
...
...
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