Mercurial > noffle
diff src/client.c @ 287:01755687c565 noffle
[svn] * src/configfile.c: Change snprintf() to Utl_cpyStr();
* src/configfile.c,src/fetch.c,src/fetchlist.c,src/protocol.c,
src/server.c: Replace strcpy() with Utl_cpyStr() where appropriate.
See Debian bug 168128.
* src/client.c. Replace strcpy() here too.
* src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
and noffle-group configs.
* src/control.c,src/configfile.c,src/noffle.c: Replace [s]scanf("%s")
with [s]scanf(MAXCHAR_FMT).
author | bears |
---|---|
date | Fri, 10 Jan 2003 23:11:43 +0000 |
parents | 9c54bf672ca1 |
children | 1aa690671cd7 |
line wrap: on
line diff
--- a/src/client.c Fri Jan 10 23:08:17 2003 +0000 +++ b/src/client.c Fri Jan 10 23:11:43 2003 +0000 @@ -1,7 +1,7 @@ /* client.c - $Id: client.c 412 2002-12-24 09:08:59Z bears $ + $Id: client.c 419 2003-01-10 23:11:43Z bears $ */ #if HAVE_CONFIG_H @@ -108,8 +108,8 @@ Bool err; unsigned int n; - strcpy( client.lastCmd, line ); - strcpy( client.lastStat, "[no status available]" ); + Utl_cpyStr( client.lastCmd, line ); + Utl_cpyStr( client.lastStat, "[no status available]" ); Log_dbg( LOG_DBG_PROTOCOL, "[S] %s", line ); n = fprintf( client.out, "%s\r\n", line ); err = ( n != strlen( line ) + 2 ); @@ -202,7 +202,7 @@ && ! client.auth ) { client.auth = TRUE; - strcpy( lastCmd, client.lastCmd ); + Utl_cpyStr( lastCmd, client.lastCmd ); result = performAuth(); if ( result == STAT_AUTH_ACCEPTED || result == STAT_AUTH_ACCEPTED_DEPREC ) @@ -286,13 +286,13 @@ pColon = strstr( pStart, ":" ); if ( pColon == NULL ) { - strcpy( host, pStart ); + Utl_cpyStr( host, pStart ); port = 119; } else { *pColon = '\0'; - strcpy( host, pStart ); + Utl_cpyStr( host, pStart ); if ( sscanf( pColon + 1, "%hu", &port ) != 1 ) { Log_err( "Syntax error in server name: '%s'", serv ); @@ -629,7 +629,7 @@ } if ( *noServerPattern && ! isGetGroup( name ) ) continue; - strcpy( dsc, Utl_restOfLn( line, 1 ) ); + Utl_cpyStr( dsc, Utl_restOfLn( line, 1 ) ); if ( Grp_exists( name ) ) { Log_dbg( LOG_DBG_FETCH, "Description of %s: %s", name, dsc ); @@ -1237,7 +1237,7 @@ else if ( stat != STAT_SEND_ART ) { Log_err( "Posting of %s not allowed: %s", msgId, client.lastStat ); - strcpy( errStr, client.lastStat ); + Utl_cpyStr( errStr, client.lastStat ); return stat; } putTxtBuf( artTxt ); @@ -1248,7 +1248,7 @@ else if ( stat != STAT_POST_OK ) { Log_err( "Posting of %s failed: %s", msgId, client.lastStat ); - strcpy( errStr, client.lastStat ); + Utl_cpyStr( errStr, client.lastStat ); return stat; } Log_inf( "Posted %s (Status: %s)", msgId, client.lastStat );