1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix #2854: crash if Ndiff exits with error status

This commit is contained in:
dmiller
2024-05-28 19:30:06 +00:00
parent 453f9a7e25
commit b6e67f834c
2 changed files with 5 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ class NdiffCommand(subprocess.Popen):
command_list,
universal_newlines=True,
stdout=self.stdout_file,
stderr=self.stdout_file,
stderr=subprocess.PIPE,
env=env,
shell=(sys.platform == "win32")
)

View File

@@ -377,6 +377,7 @@ class DiffWindow(Gtk.Window):
error_text = _(
"The ndiff process terminated with status code %d."
) % status
if self.ndiff_process.stderr:
stderr = self.ndiff_process.stderr.read()
if len(stderr) > 0:
error_text += "\n\n" + stderr