amazon-kinesis-video-streams-webrtc-sdk-c icon indicating copy to clipboard operation
amazon-kinesis-video-streams-webrtc-sdk-c copied to clipboard

Fix signaling channel null terminator

Open AndyLc opened this issue 3 years ago • 7 comments

Issue #, if available:

Description of changes: We were seeing that the channel endpoint name sometimes had extra data due to not being null terminated correctly. strncpy was not copying a null terminator, so pSignalingClient->channelEndpointWss only had a null terminator at MAX_SIGNALING_ENDPOINT_URI_LEN.

However, if the channelEndpointWss is supposed to be smaller, then it is not null terminated correctly.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AndyLc avatar Jan 19 '22 20:01 AndyLc

@AndyLc ,

Thank you for your PR. Can you open your PR against origin/develop? Please follow this: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c#development

disa6302 avatar Jan 20 '22 18:01 disa6302

@AndyLc ,

Thank you for your PR. Can you open your PR against origin/develop? Please follow this: https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c#development

Done!

AndyLc avatar Jan 20 '22 20:01 AndyLc

Thank you @AndyLc . The changes itself LGTM. But, looks like the build did not trigger. Can you push a new commit? Could be a simple space change or something.

disa6302 avatar Jan 21 '22 19:01 disa6302

Codecov Report

Merging #1374 (8dcfb34) into develop (86311e6) will decrease coverage by 28.63%. The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #1374       +/-   ##
============================================
- Coverage    85.88%   57.24%   -28.64%     
============================================
  Files           42       42               
  Lines        10790    10792        +2     
============================================
- Hits          9267     6178     -3089     
- Misses        1523     4614     +3091     
Impacted Files Coverage Δ
src/source/Signaling/LwsApiCalls.c 1.44% <0.00%> (-82.62%) :arrow_down:
src/source/Crypto/Tls.c 0.00% <0.00%> (-100.00%) :arrow_down:
src/source/Ice/TurnConnection.c 0.00% <0.00%> (-93.47%) :arrow_down:
src/source/Signaling/ChannelInfo.c 0.00% <0.00%> (-86.62%) :arrow_down:
src/source/Signaling/Signaling.c 10.73% <0.00%> (-84.86%) :arrow_down:
src/source/Signaling/StateMachine.c 0.00% <0.00%> (-83.12%) :arrow_down:
src/source/Crypto/Tls_openssl.c 0.00% <0.00%> (-82.65%) :arrow_down:
src/source/Ice/SocketConnection.c 50.90% <0.00%> (-28.83%) :arrow_down:
src/source/Signaling/FileCache.c 73.87% <0.00%> (-23.43%) :arrow_down:
... and 10 more

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 86311e6...8dcfb34. Read the comment docs.

codecov-commenter avatar Jan 22 '22 01:01 codecov-commenter

Looks like this specific test is consistently failing: https://app.travis-ci.com/github/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/jobs/556607744. Can you see if this is locally reproducible in your branch?

disa6302 avatar Jan 24 '22 20:01 disa6302

@disa6302 I ran this locally and I didn't get the same failure...

[       OK ] SignalingApiFunctionalityTest.mockMaster (1015 ms)

AndyLc avatar Jan 27 '22 22:01 AndyLc

This is a very old issue. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.

github-actions[bot] avatar Jul 27 '22 00:07 github-actions[bot]