From d28ce6b798f460c54bdc0358e8bb96d6e83d263f Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 21 Jul 2023 11:46:58 -0500 Subject: [PATCH] Bump up some 1024 buffers to 2048 to avoid overflow error --- src/sprintflst.h | 2 +- tests/ampctl.c | 2 +- tests/ampctld.c | 2 +- tests/dumpcaps.c | 2 +- tests/dumpstate.c | 2 +- tests/rigctl.c | 2 +- tests/rigctlcom.c | 2 +- tests/rigctld.c | 2 +- tests/rigctlsync.c | 2 +- tests/rigctltcp.c | 2 +- tests/rigmem.c | 2 +- tests/rigsmtr.c | 2 +- tests/rigswr.c | 2 +- tests/rotctl.c | 2 +- tests/rotctld.c | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sprintflst.h b/src/sprintflst.h index 503f794f8..bfb80ebe4 100644 --- a/src/sprintflst.h +++ b/src/sprintflst.h @@ -25,7 +25,7 @@ #include #include -#define SPRINTF_MAX_SIZE 1024 +#define SPRINTF_MAX_SIZE 2048 __BEGIN_DECLS diff --git a/tests/ampctl.c b/tests/ampctl.c index ee0a79d42..6a179206f 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -100,7 +100,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 int interactive = 1; /* if no cmd on command line, switch to interactive */ int prompt = 1; /* Print prompt in ampctl */ diff --git a/tests/ampctld.c b/tests/ampctld.c index dcfe65a45..6aeef098c 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -109,7 +109,7 @@ const char *src_addr = NULL; /* INADDR_ANY */ char send_cmd_term = '\r'; /* send_cmd termination char */ -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 static void handle_error(enum rig_debug_level_e lvl, const char *msg) diff --git a/tests/dumpcaps.c b/tests/dumpcaps.c index 2dcab5f4a..5f463dc93 100644 --- a/tests/dumpcaps.c +++ b/tests/dumpcaps.c @@ -75,7 +75,7 @@ int dumpcaps(RIG *rig, FILE *fout) char freqbuf[20]; int backend_warnings = 0; char warnbuf[4096]; - char prntbuf[1024]; /* a malloc would be better.. */ + char prntbuf[2048]; /* a malloc would be better.. */ char *label1, *label2, *label3, *label4, *label5; char *labelrx1; // , *labelrx2, *labelrx3, *labelrx4, *labelrx5; diff --git a/tests/dumpstate.c b/tests/dumpstate.c index 10062fdde..7a0f8cd93 100644 --- a/tests/dumpstate.c +++ b/tests/dumpstate.c @@ -75,7 +75,7 @@ int dumpstate(RIG *rig, FILE *fout) char freqbuf[20]; int backend_warnings = 0; char warnbuf[4096]; - char prntbuf[1024]; /* a malloc would be better.. */ + char prntbuf[2048]; /* a malloc would be better.. */ char *label1, *label2, *label3, *label4, *label5; char *labelrx1; // , *labelrx2, *labelrx3, *labelrx4, *labelrx5; diff --git a/tests/rigctl.c b/tests/rigctl.c index a400ddaa3..f388fb00e 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -113,7 +113,7 @@ static struct option long_options[] = extern char rig_resp_sep; extern powerstat_t rig_powerstat; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 int main(int argc, char *argv[]) { diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 8a7ff1f7d..329337467 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -131,7 +131,7 @@ static sig_atomic_t volatile ctrl_c; static int volatile ctrl_c; #endif -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 #if 0 # ifdef WIN32 diff --git a/tests/rigctld.c b/tests/rigctld.c index 7e18ce837..38f7a9cb8 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -154,7 +154,7 @@ static int rigctld_idle = 0; // if true then rig will close when no clients are connected static int skip_open = 0; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 void mutex_rigctld(int lock) diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index 572379593..2da444a97 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -121,7 +121,7 @@ static sig_atomic_t volatile ctrl_c; static int volatile ctrl_c; #endif -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 #if 0 # ifdef WIN32 diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index f80cfe906..f805821b4 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -157,7 +157,7 @@ extern powerstat_t rig_powerstat; static int rigctld_idle = 0; // if true then rig will close when no clients are connected -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 void mutex_rigctld(int lock) diff --git a/tests/rigmem.c b/tests/rigmem.c index 975d83ac4..dbe42eff4 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -82,7 +82,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 int all; diff --git a/tests/rigsmtr.c b/tests/rigsmtr.c index 7c4de1580..4d4f0a4f2 100644 --- a/tests/rigsmtr.c +++ b/tests/rigsmtr.c @@ -64,7 +64,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 int main(int argc, char *argv[]) diff --git a/tests/rigswr.c b/tests/rigswr.c index 50e0099ba..e76f3a761 100644 --- a/tests/rigswr.c +++ b/tests/rigswr.c @@ -59,7 +59,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 int main(int argc, char *argv[]) diff --git a/tests/rotctl.c b/tests/rotctl.c index 607570d0b..29c25dfd1 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -103,7 +103,7 @@ static struct option long_options[] = {0, 0, 0, 0} }; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 /* variable for readline support */ #ifdef HAVE_LIBREADLINE diff --git a/tests/rotctld.c b/tests/rotctld.c index 1ef14d0ca..186748b3a 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -106,7 +106,7 @@ const char *src_addr = NULL; /* INADDR_ANY */ azimuth_t az_offset; elevation_t el_offset; -#define MAXCONFLEN 1024 +#define MAXCONFLEN 2048 static void handle_error(enum rig_debug_level_e lvl, const char *msg)