diff --git a/geotranz/mgrs.c b/geotranz/mgrs.c index 66128c6..84454ab 100644 --- a/geotranz/mgrs.c +++ b/geotranz/mgrs.c @@ -400,7 +400,7 @@ long Make_MGRS_String (char* MGRS, if (Zone) i = sprintf (MGRS+i,"%2.2ld",Zone); else - strncpy(MGRS, " ", 2); // 2 spaces + strcpy(MGRS, " "); // 2 spaces - Should i be set to 2? for (j=0;j<3;j++) MGRS[i++] = alphabet[Letters[j]]; diff --git a/geotranz/usng.c b/geotranz/usng.c index e083311..fdd2fba 100644 --- a/geotranz/usng.c +++ b/geotranz/usng.c @@ -367,7 +367,7 @@ long Make_USNG_String (char* USNG, if (Zone) i = sprintf (USNG+i,"%2.2ld",Zone); else - strncpy(USNG, " ", 2); // 2 spaces + strcpy(USNG, " "); // 2 spaces - Should i be set to 2? for (j=0;j<3;j++) USNG[i++] = alphabet[Letters[j]]; diff --git a/igate.c b/igate.c index 1d73c19..c9582ce 100644 --- a/igate.c +++ b/igate.c @@ -1863,7 +1863,7 @@ static void maybe_xmit_packet_from_igate (char *message, int to_chan) * -> Raise the rate limiting value. */ if (ig_to_tx_allow (pp3, to_chan)) { - char radio [500]; + char radio [2400]; packet_t pradio; snprintf (radio, sizeof(radio), "%s>%s%d%d%s:}%s", diff --git a/kissutil.c b/kissutil.c index e4e1761..cd1bfb4 100644 --- a/kissutil.c +++ b/kissutil.c @@ -774,7 +774,7 @@ void kiss_process_msg (unsigned char *kiss_msg, int kiss_len, int debug, int cli printf ("ERROR - Invalid KISS data frame from TNC.\n"); } else { - char prefix[100]; // Channel and optional timestamp. + char prefix[120]; // Channel and optional timestamp. // Like [0] or [2 12:34:56] char addrs[AX25_MAX_ADDRS*AX25_MAX_ADDR_LEN]; // Like source>dest,digi,...,digi: diff --git a/log2gpx.c b/log2gpx.c index 15b9835..b13d80e 100644 --- a/log2gpx.c +++ b/log2gpx.c @@ -325,10 +325,10 @@ static void read_csv(FILE *fp) things[num_things].speed = speed; things[num_things].course = course; things[num_things].alt = alt; - strncpy (things[num_things].time, pisotime, sizeof(things[num_things].time)); - strncpy (things[num_things].name, pname, sizeof(things[num_things].name)); - strncpy (things[num_things].desc, desc, sizeof(things[num_things].desc)); - strncpy (things[num_things].comment, comment, sizeof(things[num_things].comment)); + strlcpy (things[num_things].time, pisotime, sizeof(things[num_things].time)); + strlcpy (things[num_things].name, pname, sizeof(things[num_things].name)); + strlcpy (things[num_things].desc, desc, sizeof(things[num_things].desc)); + strlcpy (things[num_things].comment, comment, sizeof(things[num_things].comment)); num_things++; } @@ -543,4 +543,4 @@ static void process_things (int first, int last) } printf (" %s\n", safe_name); printf (" \n"); -} \ No newline at end of file +} diff --git a/mheard.c b/mheard.c index 37163c5..eff4709 100644 --- a/mheard.c +++ b/mheard.c @@ -243,9 +243,9 @@ static void mheard_dump (void) int i; mheard_t *mptr; time_t now = time(NULL); - char stuff[80]; - char rf[16]; // hours:minutes - char is[16]; + char stuff[120]; + char rf[20]; // hours:minutes + char is[20]; char position[40]; mheard_t *station[MAXDUMP]; int num_stations = 0;