Skip to content

Commit

Permalink
gfm: fix truncation error
Browse files Browse the repository at this point in the history
tilp_and_gfm/gfm/trunk/src/labels.c: In function ‘format_path’:
tilp_and_gfm/gfm/trunk/src/labels.c:91:37: error: ‘%6i’ directive output may be truncated writing between 6 and 10 bytes into a region of size 6 [-Werror=format-truncation=]
   91 |                 snprintf(str, 8, " (%6i)", n);
      |                                     ^~~
  • Loading branch information
illwieckz committed Jun 1, 2023
1 parent 482d6d2 commit bfece33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gfm/trunk/src/labels.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static char* format_path(char *src, char *dst)
strcat(dst, "...");
strcat(dst, p);

snprintf(str, 8, " (%i)", n);
snprintf(str, 8, " (%i)", n%6);
strcat(dst, str);

free(left);
Expand Down

0 comments on commit bfece33

Please sign in to comment.