Skip to content

Commit

Permalink
_subprocess: perform invalid UTF-8 substitution (#572)
Browse files Browse the repository at this point in the history
* _subprocess: perform invalid UTF-8 substitution

Signed-off-by: William Woodruff <william@trailofbits.com>

* CHANGELOG: record changes

Signed-off-by: William Woodruff <william@trailofbits.com>

---------

Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw authored Mar 23, 2023
1 parent f12066a commit 3e13200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ All versions prior to 0.0.9 are untracked.
behaviour when using hashed requirements or the `--no-deps` flag
([#540](https://github.com/pypa/pip-audit/pull/540))

### Fixed

* Fixed a crash caused by invalid UTF-8 sequences in subprocess outputs
([#572](https://github.com/pypa/pip-audit/pull/572))

## [2.5.2]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion pip_audit/_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ def run(args: Sequence[str], *, log_stdout: bool = False, state: AuditState = Au
stderr=stderr.decode(errors="replace"),
)

return stdout.decode("utf-8")
return stdout.decode("utf-8", errors="replace")

0 comments on commit 3e13200

Please sign in to comment.