forked from github/server
CID 22564: Copy into fixed size buffer (STRING_OVERFLOW)
buffer sizes => bsdstring.h
This commit is contained in:
parent
df82a9795d
commit
0de6e5ecb8
|
@ -1621,9 +1621,10 @@ static void write_script(FILE * F, const faction * f)
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
for (rtype = report_types; rtype != NULL; rtype = rtype->next) {
|
for (rtype = report_types; rtype != NULL; rtype = rtype->next) {
|
||||||
if (f->options & rtype->flag) {
|
if (f->options & rtype->flag) {
|
||||||
if (buf[0])
|
if (buf[0]) {
|
||||||
strcat(buf, ",");
|
strlcat(buf, ",", sizeof(buf));
|
||||||
strcat(buf, rtype->extension);
|
}
|
||||||
|
strlcat(buf, rtype->extension, sizeof(buf));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fputs(buf, F);
|
fputs(buf, F);
|
||||||
|
|
Loading…
Reference in New Issue