Skip to content

Commit

Permalink
Fix code scanning alert no. 2328: Potentially overrunning write (#1280)
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 9e77531 commit 80fe626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/f2c/src/c/libf2c/endfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ alist* a;
b = &f__units[a->aunit];
if (b->ufd == NULL) {
char nbuf[10];
sprintf(nbuf, "fort.%ld", (long)a->aunit);
snprintf(nbuf, sizeof(nbuf), "fort.%ld", (long)a->aunit);
if (tf = FOPEN(nbuf, f__w_mode[0])) {
fclose(tf);
}
Expand Down

0 comments on commit 80fe626

Please sign in to comment.