Commit 2975d37
committed
libvisual/lv_plugin.c: Address warning -Wformat-truncation=
Symptom was:
> ../../libvisual-0.4.2/libvisual/lv_plugin.c: In function 'plugin_add_dir_to_list':
> ../../libvisual-0.4.2/libvisual/lv_plugin.c:605:39: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1022 [-Werror=format-truncation=]
> 605 | snprintf (temp, 1023, "%s/%s", dir, namelist[i]->d_name);
> | ^~~~~~~
> ../../libvisual-0.4.2/libvisual/lv_plugin.c:605:43: note: format string is defined here
> 605 | snprintf (temp, 1023, "%s/%s", dir, namelist[i]->d_name);
> | ^~
> ../../libvisual-0.4.2/libvisual/lv_plugin.c:605:17: note: '__builtin_snprintf' output 2 or more bytes (assuming 1025) into a destination of size 1023
> 605 | snprintf (temp, 1023, "%s/%s", dir, namelist[i]->d_name);
> | ^~~~~~~~
TRUNC1 parent a7ba61a commit 2975d37
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
565 | | - | |
| 565 | + | |
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
| 605 | + | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| |||
0 commit comments