diff --git a/CHANGELOG.md b/CHANGELOG.md index bb4f7805..a59f15c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Skip invalid sources ([#861](https://github.com/getsentry/symbolic/pull/861)) + ## 12.10.0 **Features** diff --git a/symbolic-debuginfo/src/sourcebundle.rs b/symbolic-debuginfo/src/sourcebundle.rs index ebddd50e..730fe023 100644 --- a/symbolic-debuginfo/src/sourcebundle.rs +++ b/symbolic-debuginfo/src/sourcebundle.rs @@ -1314,7 +1314,10 @@ where info.set_ty(SourceFileType::Source); info.set_path(filename.clone()); - self.add_file(bundle_path, source, info)?; + if let Err(e) = self.add_file(bundle_path, source, info) { + // Skip sources that are not UTF-8 + if e.kind != SourceBundleErrorKind::ReadFailed { return Err(e) }; + } } }