mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-26 07:58:52 +01:00
fix too-small buffer. Seems I've done this before.
This commit is contained in:
parent
c6e994abef
commit
ba5ff6cb5d
1 changed files with 3 additions and 2 deletions
|
@ -241,9 +241,9 @@ do_deletes( int sockfd, const char** connNames, int nConnNames )
|
|||
int ii;
|
||||
|
||||
char buf[4096];
|
||||
int nused = 0;
|
||||
size_t nused = 0;
|
||||
for ( ii = 0; ii < nConnNames; ++ii ) {
|
||||
char tmp[32];
|
||||
char tmp[128];
|
||||
strcpy( tmp, connNames[ii] );
|
||||
char* seedp = strrchr( tmp, '/' );
|
||||
assert( !!seedp );
|
||||
|
@ -256,6 +256,7 @@ do_deletes( int sockfd, const char** connNames, int nConnNames )
|
|||
nused += sprintf( &buf[nused], "%s", tmp );
|
||||
buf[nused++] = '\n';
|
||||
}
|
||||
assert( nused < sizeof(buf) );
|
||||
|
||||
unsigned char hdr[] = { 0, PRX_DEVICE_GONE };
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue