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
9be62fb1
Commit
9be62fb1
authored
Sep 08, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: lower regions count limit (#354)
parent
f6f883b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
RegionMaker.java
...main/java/jadx/core/dex/visitors/regions/RegionMaker.java
+5
-5
No files found.
jadx-core/src/main/java/jadx/core/dex/visitors/regions/RegionMaker.java
View file @
9be62fb1
...
...
@@ -55,16 +55,16 @@ import static jadx.core.utils.BlockUtils.skipSyntheticSuccessor;
public
class
RegionMaker
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
RegionMaker
.
class
);
// 'dumb' guard to prevent endless loop in regions processing
private
static
final
int
REGIONS_LIMIT
=
1000
*
1000
;
private
final
MethodNode
mth
;
private
final
int
regionsLimit
;
private
int
regionsCount
;
private
BitSet
processedBlocks
;
public
RegionMaker
(
MethodNode
mth
)
{
this
.
mth
=
mth
;
this
.
processedBlocks
=
new
BitSet
(
mth
.
getBasicBlocks
().
size
());
int
blocksCount
=
mth
.
getBasicBlocks
().
size
();
this
.
processedBlocks
=
new
BitSet
(
blocksCount
);
this
.
regionsLimit
=
blocksCount
*
100
;
}
public
Region
makeRegion
(
BlockNode
startBlock
,
RegionStack
stack
)
{
...
...
@@ -84,7 +84,7 @@ public class RegionMaker {
while
(
next
!=
null
)
{
next
=
traverse
(
r
,
next
,
stack
);
regionsCount
++;
if
(
regionsCount
>
REGIONS_LIMIT
)
{
if
(
regionsCount
>
regionsLimit
)
{
throw
new
JadxRuntimeException
(
"Regions count limit reached"
);
}
}
...
...
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