Fix signaling channel null terminator
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 ,
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
@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!
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.
Codecov Report
Merging #1374 (8dcfb34) into develop (86311e6) will decrease coverage by
28.63%. The diff coverage is0.00%.
@@ 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 dataPowered by Codecov. Last update 86311e6...8dcfb34. Read the comment docs.
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 I ran this locally and I didn't get the same failure...
[ OK ] SignalingApiFunctionalityTest.mockMaster (1015 ms)
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.