Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Nov 24, 2025

Backport 8b91d3a from #99732.

Fixes #99678

WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 8b91d3a)
@github-actions github-actions bot added the Backport Backport PR and backport failure issues label Nov 24, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Nov 24, 2025
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking Backport Backport PR and backport failure issues

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

3 participants