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
5e722c68
Commit
5e722c68
authored
Nov 29, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issues reported by coverity
parent
10198bc8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
8 deletions
+17
-8
InsnGen.java
jadx-core/src/main/java/jadx/core/codegen/InsnGen.java
+3
-0
InsnArg.java
...rc/main/java/jadx/core/dex/instructions/args/InsnArg.java
+3
-0
ConstInlinerVisitor.java
...main/java/jadx/core/dex/visitors/ConstInlinerVisitor.java
+6
-6
BlockFinallyExtract.java
...dx/core/dex/visitors/blocksmaker/BlockFinallyExtract.java
+4
-1
JadxUpdate.java
jadx-gui/src/main/java/jadx/gui/update/JadxUpdate.java
+1
-1
No files found.
jadx-core/src/main/java/jadx/core/codegen/InsnGen.java
View file @
5e722c68
...
...
@@ -535,6 +535,9 @@ public class InsnGen {
if
(!
elType
.
isTypeKnown
())
{
LOG
.
warn
(
"Unknown array element type: {} in mth: {}"
,
elType
,
mth
);
elType
=
insnElementType
.
isTypeKnown
()
?
insnElementType
:
elType
.
selectFirst
();
if
(
elType
==
null
)
{
throw
new
JadxRuntimeException
(
"Null array element type"
);
}
}
insn
.
mergeElementType
(
elType
);
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/InsnArg.java
View file @
5e722c68
...
...
@@ -7,6 +7,7 @@ import jadx.core.utils.InsnUtils;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.jetbrains.annotations.Nullable
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -20,6 +21,7 @@ public abstract class InsnArg extends Typed {
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
InsnArg
.
class
);
@Nullable
(
"Null for method arguments"
)
protected
InsnNode
parentInsn
;
public
static
RegisterArg
reg
(
int
regNum
,
ArgType
type
)
{
...
...
@@ -70,6 +72,7 @@ public abstract class InsnArg extends Typed {
return
false
;
}
@Nullable
public
InsnNode
getParentInsn
()
{
return
parentInsn
;
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/ConstInlinerVisitor.java
View file @
5e722c68
...
...
@@ -52,14 +52,14 @@ public class ConstInlinerVisitor extends AbstractVisitor {
long
lit
=
((
LiteralArg
)
arg
).
getLiteral
();
SSAVar
sVar
=
insn
.
getResult
().
getSVar
();
if
(
lit
==
0
)
{
if
(
checkObjectInline
(
sVar
))
{
if
(
sVar
.
getUseCount
()
==
1
)
{
insn
.
getResult
().
getAssignInsn
().
add
(
AFlag
.
DONT_INLINE
);
if
(
lit
==
0
&&
checkObjectInline
(
sVar
))
{
if
(
sVar
.
getUseCount
()
==
1
)
{
InsnNode
assignInsn
=
insn
.
getResult
().
getAssignInsn
();
if
(
assignInsn
!=
null
)
{
assignInsn
.
add
(
AFlag
.
DONT_INLINE
);
}
return
false
;
}
return
false
;
}
ArgType
resType
=
insn
.
getResult
().
getType
();
// make sure arg has correct type
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/blocksmaker/BlockFinallyExtract.java
View file @
5e722c68
...
...
@@ -468,6 +468,10 @@ public class BlockFinallyExtract extends AbstractVisitor {
if
(
pred
==
null
)
{
return
;
}
IgnoreEdgeAttr
edgeAttr
=
pred
.
get
(
AType
.
IGNORE_EDGE
);
if
(
edgeAttr
==
null
)
{
return
;
}
List
<
BlockNode
>
merge
=
new
LinkedList
<
BlockNode
>();
for
(
BlockNode
blockNode
:
pred
.
getSuccessors
())
{
if
(
blockNode
.
contains
(
AFlag
.
RETURN
))
{
...
...
@@ -488,7 +492,6 @@ public class BlockFinallyExtract extends AbstractVisitor {
if
(
origReturnBlock
==
null
)
{
return
;
}
IgnoreEdgeAttr
edgeAttr
=
pred
.
get
(
AType
.
IGNORE_EDGE
);
for
(
BlockNode
mb
:
merge
)
{
if
(
mb
==
origReturnBlock
)
{
continue
;
...
...
jadx-gui/src/main/java/jadx/gui/update/JadxUpdate.java
View file @
5e722c68
...
...
@@ -102,7 +102,7 @@ public class JadxUpdate {
HttpURLConnection
con
=
(
HttpURLConnection
)
obj
.
openConnection
();
con
.
setRequestMethod
(
"GET"
);
if
(
con
.
getResponseCode
()
==
200
)
{
Reader
reader
=
new
InputStreamReader
(
con
.
getInputStream
());
Reader
reader
=
new
InputStreamReader
(
con
.
getInputStream
()
,
"UTF-8"
);
return
GSON
.
fromJson
(
reader
,
type
);
}
return
null
;
...
...
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