Do not lazily use BUFSIZ for "I don't care what size" when building

strings because it is only guaranteed to be 256 bytes and even the
default 1024 is not always enough. Reported by Gregory Pakosz.
This commit is contained in:
nicm
2019-10-03 10:24:05 +00:00
committed by Nicholas Marriott
parent b2fd161b07
commit 5afe7eb850
5 changed files with 7 additions and 7 deletions

2
cmd.c
View File

@@ -384,7 +384,7 @@ cmd_find(const char *name, char **cause)
{
const struct cmd_entry **loop, *entry, *found = NULL;
int ambiguous;
char s[BUFSIZ];
char s[8192];
ambiguous = 0;
for (loop = cmd_table; *loop != NULL; loop++) {