8000 snmp_agent plugin: Fix strncat() truncation warning. by octo · Pull Request #3564 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

snmp_agent plugin: Fix strncat() truncation warning. #3564

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

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

octo
Copy link
Member
@octo octo commented Sep 3, 2020

Fixes:

src/snmp_agent.c:965:9: error: ‘strncat’ output may be truncated copying between 0 and 127 bytes from a string of length 127 [-Werror=stringop-truncation]
         strncat(out, str, DATA_MAX_NAME_LEN - strlen(out) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ChangeLog: snmp_agent plugin: A strncat() truncation warning has been fixed.

Fixes:

```
src/snmp_agent.c:965:9: error: ‘strncat’ output may be truncated copying between 0 and 127 bytes from a string of length 127 [-Werror=stringop-truncation]
         strncat(out, str, DATA_MAX_NAME_LEN - strlen(out) - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@octo octo added the Bug A genuine bug label Sep 3, 2020
@octo octo added this to the 5.12 milestone Sep 3, 2020
@octo octo requested a review from a team as a code owner September 3, 2020 07:13
@mrunge
Copy link
Member
mrunge commented Sep 3, 2020

good catch!

@octo octo merged commit 66ccdf0 into collectd:collectd-5.12 Sep 3, 2020
@octo octo mentioned this pull request Sep 14, 2020
@octo octo added Fix A pull request fixing a bug and removed Bug A genuine bug labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix A pull request fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0