Skip to content

Build warnings on subsys/net/lib/websocket/websocket.c #99678

@mohanrajd-eaton

Description

@mohanrajd-eaton

Describe the bug

when speed optimization enabled subsys/net/lib/websocket/websocket.c gives build warnings

Regression

  • This is a regression.

Steps to reproduce

Build samples/net/sockets/websocket_client example with speed optimization enable (CONFIG_SPEED_OPTIMIZATIONS)

Relevant log output

websocket.c:342:9:warning:'strncpy' output truncated copying between 0 and 36 bytes from a string of length 36 [-Wstringop-truncation]

343: strncpy(key_accept + key_len, WS_MAGIC, olen)

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

OS: windows
Toolchain: zephyr-sdk-0,16.8
Zephyr version: 3.7.0

Additional Context

No response

Metadata

Metadata

Assignees

Labels

area: NetworkingbugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions