Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unpack: make sure stdout is locked #301

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

Gottox
Copy link
Owner

@Gottox Gottox commented Dec 12, 2024

When reading malformed archives, unpack may write error messages to stdout from multiple threads. This can result in interleaved output and garbled messages. To prevent this, a static mutex is added to output functions in common.c.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 37.25490% with 32 lines in your changes missing coverage. Please review.

Project coverage is 64.26%. Comparing base (d1e8116) to head (00bef59).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tools/src/common.c 51.42% 17 Missing ⚠️
tools/src/unpack.c 6.25% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
- Coverage   64.30%   64.26%   -0.04%     
==========================================
  Files          75       75              
  Lines        5958     5985      +27     
  Branches      904      904              
==========================================
+ Hits         3831     3846      +15     
- Misses       1589     1601      +12     
  Partials      538      538              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

When reading malformed archives, unpack may write error messages to
stdout from multiple threads. This can result in interleaved output
and garbled messages. To prevent this, a static mutex is added to
output functions in common.c.
@Gottox Gottox force-pushed the fix/unpack-unlocked-stdout branch from fedc8d9 to 00bef59 Compare December 13, 2024 12:08
Copy link

@Gottox Gottox merged commit 0ab77ca into main Dec 13, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant