Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cwe_checker
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
cwe_checker
Commits
d9750edc
Unverified
Commit
d9750edc
authored
Jun 15, 2021
by
Melvin Klimke
Committed by
GitHub
Jun 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent infinite loop if Ghidra crashes (#188)
parent
46af37e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
main.rs
src/caller/src/main.rs
+16
-0
PcodeExtractor.java
src/ghidra/p_code_extractor/PcodeExtractor.java
+1
-0
No files found.
src/caller/src/main.rs
View file @
d9750edc
...
...
@@ -277,6 +277,22 @@ fn get_project_from_ghidra(file_path: &Path, binary: &[u8]) -> (Project, Vec<Log
}
};
match
String
::
from_utf8
(
output
.stdout
.clone
())
{
Ok
(
standard_out
)
=>
{
if
!
standard_out
.contains
(
"Pcode was successfully extracted!"
)
{
eprintln!
(
"Execution of Ghidra plugin failed: Process was terminated."
);
let
error_message
:
String
=
standard_out
.lines
()
.rev
()
.collect
::
<
Vec
<&
str
>>
()[
..
2
]
.join
(
"
\n
"
);
eprintln!
(
"{}"
,
error_message
);
std
::
process
::
exit
(
101
);
}
}
Err
(
_
)
=>
{
eprintln!
(
"Execution of Ghidra plugin failed: Process was terminated."
);
std
::
process
::
exit
(
101
);
}
}
if
!
output
.status
.success
()
{
match
output
.status
.code
()
{
Some
(
code
)
=>
{
...
...
src/ghidra/p_code_extractor/PcodeExtractor.java
View file @
d9750edc
...
...
@@ -58,6 +58,7 @@ public class PcodeExtractor extends GhidraScript {
Serializer
ser
=
new
Serializer
(
project
,
jsonPath
);
ser
.
serializeProject
();
println
(
"Pcode was successfully extracted!"
);
}
...
...
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