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

dahdi_cfg: Format truncation warnings #10

Open
InterLinked1 opened this issue Dec 10, 2022 · 0 comments
Open

dahdi_cfg: Format truncation warnings #10

InterLinked1 opened this issue Dec 10, 2022 · 0 comments

Comments

@InterLinked1
Copy link
Contributor

Since the project has moved from Atlassian to GitHub, reporting this here now:

  CC       dahdi_cfg.o
dahdi_cfg.c: In function ‘are_all_spans_assigned’:
dahdi_cfg.c:153:7: warning: ‘/span_count’ directive output may be truncated writing 11 bytes into a region of size between 0 and 1023 [-Wformat-truncation=]
  153 |    "%s/span_count", device_path);
      |       ^~~~~~~~~~~
dahdi_cfg.c:152:2: note: ‘snprintf’ output between 12 and 1035 bytes into a destination of size 1023
  152 |  snprintf(attribute, sizeof(attribute) - 1,
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  153 |    "%s/span_count", device_path);
      |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CCLD     dahdi_cfg
InterLinked1 added a commit to InterLinked1/dahdi-tools that referenced this issue Dec 30, 2024
Increase buffer size to the minimum needed to silence warning.

Resolves: asterisk#10
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

1 participant