Skip to content

Commit

Permalink
Do not crash on UTF-8 decode errors (#423)
Browse files Browse the repository at this point in the history
This PR implements a fix suggested in #407.

There are also other UTF-8 related issues:
#130
#347
#292
  • Loading branch information
kubouch authored Oct 18, 2023
1 parent 93e9312 commit 9334c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdbgui/server/ptylib.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def read(self) -> Optional[str]:
if data_to_read:
try:
response = os.read(self.stdout, self.max_read_bytes).decode()
except OSError:
except (OSError, UnicodeDecodeError):
return None
return response
return None
Expand Down

0 comments on commit 9334c7e

Please sign in to comment.