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

[BUG] Fixed wrong reaction on failure KMREQ and unsafe construction of EventVariant #1666

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Nov 20, 2020

Fixes #1665

  1. Changed the construction of EventVariant.

This likely wasn't exactly understood as intended by the compiler and some weird copying rules were likely used, which resulted to stack override. Instead a simpler and more straightforward form was provided: construct by explicit constructor and explicit call to EventVariant was therefore needed at the call to updateCC.

  1. Fix in processSrtMsg - missing the function call protocol

The protocol mandates that this function return true if the message was understood and false if not, while no matter if it encountered an error or succeeded, it should return true, just do no response call, or respond with error, depending on a situation. In case of failed KMREQ message it was simply returning false, which was wrong behavior.

@ethouris ethouris added [core] Area: Changes in SRT library core Priority: High Type: Bug Indicates an unexpected problem or unintended behavior labels Nov 20, 2020
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Nov 20, 2020
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #1666 (d13891a) into master (b0a9d4d) will increase coverage by 0.26%.
The diff coverage is 76.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1666      +/-   ##
==========================================
+ Coverage   53.04%   53.31%   +0.26%     
==========================================
  Files          77       77              
  Lines       17046    17053       +7     
==========================================
+ Hits         9042     9091      +49     
+ Misses       8004     7962      -42     
Impacted Files Coverage Δ
srtcore/core.cpp 51.27% <53.84%> (+0.66%) ⬆️
srtcore/common.h 78.76% <100.00%> (+0.24%) ⬆️
srtcore/window.cpp 81.81% <0.00%> (-1.30%) ⬇️
srtcore/sync.cpp 72.15% <0.00%> (-1.27%) ⬇️
srtcore/buffer.cpp 54.74% <0.00%> (-0.35%) ⬇️
srtcore/queue.cpp 81.04% <0.00%> (+0.08%) ⬆️
srtcore/api.cpp 36.60% <0.00%> (+0.16%) ⬆️
srtcore/list.cpp 76.52% <0.00%> (+1.44%) ⬆️
srtcore/congctl.cpp 82.56% <0.00%> (+5.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0a9d4d...d13891a. Read the comment docs.

@maxsharabayko maxsharabayko merged commit d91e66f into Haivision:master Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: High Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SEGFAULT (stack overflow) on wrong password with srt 1.4.2
2 participants