Mercurial > noffle
comparison src/protocol.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 | baa6408d1bbc |
children | 4426f4dc6e8b |
comparison
equal
deleted
inserted
replaced
286:6443163104a8 | 287:01755687c565 |
---|---|
1 /* | 1 /* |
2 protocol.c | 2 protocol.c |
3 | 3 |
4 $Id: protocol.c 414 2003-01-06 18:16:18Z bears $ | 4 $Id: protocol.c 419 2003-01-10 23:11:43Z bears $ |
5 */ | 5 */ |
6 | 6 |
7 #if HAVE_CONFIG_H | 7 #if HAVE_CONFIG_H |
8 #include <config.h> | 8 #include <config.h> |
9 #endif | 9 #endif |
110 if ( buf[ 0 ] == '.' ) | 110 if ( buf[ 0 ] == '.' ) |
111 { | 111 { |
112 if ( buf[ 1 ] == 0 ) | 112 if ( buf[ 1 ] == 0 ) |
113 return FALSE; | 113 return FALSE; |
114 else | 114 else |
115 strcpy( line, buf + 1 ); | 115 Utl_cpyStr( line, buf + 1 ); |
116 } | 116 } |
117 else | 117 else |
118 strcpy( line, buf ); | 118 Utl_cpyStr( line, buf ); |
119 return TRUE; | 119 return TRUE; |
120 } | 120 } |
121 | 121 |
122 Bool | 122 Bool |
123 Prt_putTxtLn( const char* line, FILE *f ) | 123 Prt_putTxtLn( const char* line, FILE *f ) |
202 while ( isspace( *p ) ) | 202 while ( isspace( *p ) ) |
203 ++p; | 203 ++p; |
204 if ( *p == ':' ) | 204 if ( *p == ':' ) |
205 { | 205 { |
206 ++p; | 206 ++p; |
207 strcpy( t, line + ( p - lineLower ) ); | 207 Utl_cpyStr( t, line + ( p - lineLower ) ); |
208 p = Utl_stripWhiteSpace( t ); | 208 p = Utl_stripWhiteSpace( t ); |
209 strcpy( resultValue, p ); | 209 Utl_cpyStr( resultValue, p ); |
210 return TRUE; | 210 return TRUE; |
211 } else | 211 } else |
212 return FALSE; /* Not a header line */ | 212 return FALSE; /* Not a header line */ |
213 } | 213 } |
214 else | 214 else |