diff --git a/daemons/cand/CanRxListener.cpp b/daemons/cand/CanRxListener.cpp index 392ce10..3e7414d 100644 --- a/daemons/cand/CanRxListener.cpp +++ b/daemons/cand/CanRxListener.cpp @@ -84,7 +84,7 @@ void *CanRxListener::Run(void *arg) if ( nread == 0 ) continue; - char timebuf[32]; + char timebuf[100]; if ( Logging.IsLogging() ) { diff --git a/daemons/cand/CanTxGenerator.cpp b/daemons/cand/CanTxGenerator.cpp index da81056..53207a0 100644 --- a/daemons/cand/CanTxGenerator.cpp +++ b/daemons/cand/CanTxGenerator.cpp @@ -97,7 +97,7 @@ void *CanTxGenerator::Run(void *arg) struct tm tm; gettimeofday( &tv, NULL ); gmtime_r( &tv.tv_sec, &tm ); - char buf[32]; + char buf[100]; sprintf( buf, "%4d/%2d/%2d-%2d:%2d:%2d.%03ld", tm.tm_year+1900, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, diff --git a/src/libnet/uri_parse.c b/src/libnet/uri_parse.c index db5a980..43ea6ad 100644 --- a/src/libnet/uri_parse.c +++ b/src/libnet/uri_parse.c @@ -154,7 +154,7 @@ int uri_parse( const char *uri, uri_parts *parsed ) strncpy( parsed->port, port, sizeof(parsed->port) ); } if ( path ) - strncat( parsed->path, path, sizeof(parsed->path) ); + strncat( parsed->path, path, sizeof(parsed->path)-1 ); return ret; }