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

fix: Fix use-after-free when closing qTox during a call. #192

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Dec 3, 2024

You shouldn't iterate over a container and modify it at the same time (unless you do it = c.erase(...) which this code can't do, and you can't do in range-for anyway.

Fixes #180.


This change is Reviewable

@iphydf iphydf added this to the v1.18.0 milestone Dec 3, 2024
@github-actions github-actions bot added the bug Bug fix for the user, not a fix to a build script label Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 11.05%. Comparing base (30e619e) to head (7381ccd).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
util/include/util/algorithm.h 0.00% 7 Missing ⚠️
src/core/coreav.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   11.05%   11.05%   -0.01%     
==========================================
  Files         292      294       +2     
  Lines       21223    21231       +8     
==========================================
  Hits         2347     2347              
- Misses      18876    18884       +8     

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

You shouldn't iterate over a container and modify it at the same time
(unless you do `it = c.erase(...)` which this code can't do, and you
can't do in range-for anyway.
@toktok-releaser toktok-releaser merged commit 6da12d6 into TokTok:master Dec 4, 2024
28 checks passed
@iphydf iphydf deleted the use-after-free branch December 4, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix for the user, not a fix to a build script
Development

Successfully merging this pull request may close these issues.

Bug: Use-after-free when closing qTox during an audio call
3 participants