Skip to content

Commit

Permalink
Flush stderr when executing BinDiff
Browse files Browse the repository at this point in the history
Fix #31
  • Loading branch information
ubfx committed Feb 12, 2025
1 parent 8eeb81d commit 1f8a518
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/bindiffhelper/BinDiffHelperPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ public void callBinDiff(DomainFile df, Consumer<File[]> callback)
try {
p = Runtime.getRuntime().exec(cmd);
var i = new BufferedReader(new InputStreamReader(p.getInputStream()));

var stderr = p.getErrorStream();
while (!p.waitFor(1, TimeUnit.SECONDS)) {
// Empty stderr buffer
stderr.skip(stderr.available());

while (true)
{
String line = i.readLine();
Expand Down

0 comments on commit 1f8a518

Please sign in to comment.