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

-Wstringop-truncation warnings observed in core_http_client.c #137

Closed
SKZahidBasha-Silabs opened this issue Aug 12, 2022 · 1 comment
Closed

Comments

@SKZahidBasha-Silabs
Copy link

SKZahidBasha-Silabs commented Aug 12, 2022

Warning related to strncpy is observed in the core_http_client.c file at the below line of code. Attached is the warning snapshot :
MicrosoftTeams-image (2)

Line of code:

( void ) strncpy( rangeValueBuffer,
HTTP_RANGE_REQUEST_HEADER_VALUE_PREFIX,
HTTP_RANGE_REQUEST_HEADER_VALUE_PREFIX_LEN );

Note: A similar issue was created in the past for which "strncpy" was replaced with "memcpy" as a fix. Attaching the link to that issue below.
#133

@n9wxu
Copy link
Member

n9wxu commented Aug 16, 2022

resolved. But the fix triggers a MISRA rule 7.4 violation. We will be looking at further changes in the future.

@n9wxu n9wxu closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants