asterisk / dahdi-tools

This is the official dahdi-tools repository. All issues and PR should be raised here.
GNU General Public License v2.0
17 stars 30 forks source link

dahdi_cfg: Format truncation warnings #10

Open InterLinked1 opened 1 year ago

InterLinked1 commented 1 year ago

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