diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-19 21:55:50 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-19 21:55:50 +0100 |
commit | f2590398cc1c844b5d12a31502edbe7aab37bb00 (patch) | |
tree | f1f70e46f9d51a9f02e2b3ef215fd7ee9797180b /FICS | |
parent | 686783dee7d71c84663dffff165ada61edf9b2a8 (diff) |
plogins: added width spec
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/comproc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index f5c4c9f..266a623 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -744,9 +744,12 @@ plogins(int p, char *fname) return COM_OK; } + _Static_assert(19 < ARRAY_SIZE(ipstr), "'ipstr' too small"); + _Static_assert(19 < ARRAY_SIZE(loginName), "'loginName' too small"); + while (!feof(fp)) { - if (fscanf(fp, "%d %s %ld %d %s\n", &inout, loginName, &lval, - ®istered, ipstr) != 5) { + if (fscanf(fp, "%d %19s %ld %d %19s\n", &inout, loginName, + &lval, ®istered, ipstr) != 5) { fprintf(stderr, "FICS: Error in login info format. " "%s\n", fname); fclose(fp); |