1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 00:34:04 +00:00

Fix a possible buffer overflow.

This commit is contained in:
Josh Elsasser 2007-02-13 04:21:29 +00:00
parent a9f981b095
commit 6761fb7dcd

View file

@ -218,7 +218,10 @@ int main( int argc, char ** argv )
s->peersDownloading, s->peersTotal,
s->rateUpload );
}
memset( &string[chars], ' ', 79 - chars );
if( 79 > chars )
{
memset( &string[chars], ' ', 79 - chars );
}
string[79] = '\0';
fprintf( stderr, "\r%s", string );