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

Increase buffer size to avoid possible truncation: #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bbonev
Copy link

@bbonev bbonev commented Dec 1, 2020

CC bmon-in_netlink.o
in_netlink.c: In function ‘handle_tc_obj’:
in_netlink.c:558:37: warning: ‘ (’ directive output may be truncated writing 2 bytes into a region of size between 0 and 31 [-Wformat-truncation=]
558 | snprintf(name, sizeof(name), "%s %s (%s)",
| ^~
in_netlink.c:558:2: note: ‘snprintf’ output 5 or more bytes (assuming 36) into a destination of size 32
558 | snprintf(name, sizeof(name), "%s %s (%s)",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
559 | prefix, buf, rtnl_tc_get_kind(tc));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CCLD bmon

  CC       bmon-in_netlink.o
in_netlink.c: In function ‘handle_tc_obj’:
in_netlink.c:558:37: warning: ‘ (’ directive output may be truncated writing 2 bytes into a region of size between 0 and 31 [-Wformat-truncation=]
  558 |  snprintf(name, sizeof(name), "%s %s (%s)",
      |                                     ^~
in_netlink.c:558:2: note: ‘snprintf’ output 5 or more bytes (assuming 36) into a destination of size 32
  558 |  snprintf(name, sizeof(name), "%s %s (%s)",
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  559 |    prefix, buf, rtnl_tc_get_kind(tc));
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     bmon
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

Successfully merging this pull request may close these issues.

1 participant